def main(speech_files, output_directory, lexical=False, enable_proxy=False, *argv):
    'Main function for STT-functionality\n    Args:\n        speech_files: Directory of audio files to be transcribed\n        output_directory: Output directory for the file\n        lexical: Boolean to enable extended lexical version of STT-result\n        enable_proxy: Boolean to enable proxy function in case you need it\n        *argv: Proxy information if enable_proxy is True -> hostname: str, port: str, username: str, password: str\n    Returns:\n        zip(filenames, results): Zipped lists of filenames and STT-results as string\n    '
    try:
        speech_config = speechsdk.SpeechConfig(subscription=pa.config_data['stt_key'], region=pa.config_data['stt_region'])
    except RuntimeError:
        logging.error('[ERROR] - Could not retrieve speech config')
    if enable_proxy:
        speech_config.set_proxy(argv[0], argv[1], argv[2], argv[3])
    speech_config.set_service_property(name='format', value='detailed', channel=speechsdk.ServicePropertyChannel.UriQueryParameter)
    if (pa.config_data['stt_endpoint'] != ''):
        speech_config.endpoint_id = pa.config_data['stt_endpoint']
    logging.info(f'[INFO] - Starting to transcribe {len(next(os.walk(speech_files))[2])} audio files')
    results = []
    filenames = []
    for audio in glob.iglob(f'{speech_files}*av'):
        (result, filename) = request_endpoint(audio, speech_config, output_directory, lexical)
        results.append(result)
        filenames.append(filename)
    return zip(filenames, results)
Main function for STT-functionality
Args:
    speech_files: Directory of audio files to be transcribed
    output_directory: Output directory for the file
    lexical: Boolean to enable extended lexical version of STT-result
    enable_proxy: Boolean to enable proxy function in case you need it
    *argv: Proxy information if enable_proxy is True -> hostname: str, port: str, username: str, password: str
Returns:
    zip(filenames, results): Zipped lists of filenames and STT-results as string
def main(speech_files, output_directory, lexical=False, enable_proxy=False, *argv):
    'Main function for STT-functionality\n    Args:\n        speech_files: Directory of audio files to be transcribed\n        output_directory: Output directory for the file\n        lexical: Boolean to enable extended lexical version of STT-result\n        enable_proxy: Boolean to enable proxy function in case you need it\n        *argv: Proxy information if enable_proxy is True -> hostname: str, port: str, username: str, password: str\n    Returns:\n        zip(filenames, results): Zipped lists of filenames and STT-results as string\n    '
    try:
        speech_config = speechsdk.SpeechConfig(subscription=pa.config_data['stt_key'], region=pa.config_data['stt_region'])
    except RuntimeError:
        logging.error('[ERROR] - Could not retrieve speech config')
    if enable_proxy:
        speech_config.set_proxy(argv[0], argv[1], argv[2], argv[3])
    speech_config.set_service_property(name='format', value='detailed', channel=speechsdk.ServicePropertyChannel.UriQueryParameter)
    if (pa.config_data['stt_endpoint'] != ):
        speech_config.endpoint_id = pa.config_data['stt_endpoint']
    logging.info(f'[INFO] - Starting to transcribe {len(next(os.walk(speech_files))[2])} audio files')
    results = []
    filenames = []
    for audio in glob.iglob(f'{speech_files}*av'):
        (result, filename) = request_endpoint(audio, speech_config, output_directory, lexical)
        results.append(result)
        filenames.append(filename)
    return zip(filenames, results)