【问题标题】:French speech to text using azure使用 azure 将法语语音转换为文本
【发布时间】:2019-02-26 10:05:19
【问题描述】:

我正在通过 Python 使用来自 Azure 的语音到文本。 我想在法语中使用它,但没有成功。对于英语,它运作良好,但在法语中我不知道该怎么做。 我正在使用 Python 3.7。 我使用这里写的代码: https://docs.microsoft.com/fr-fr/azure/cognitive-services/speech-service/quickstart-python.

感谢您的帮助

【问题讨论】:

  • 可以给出源语言和目标语言
  • 在哪里?在哪个函数中?

标签: python azure api speech-to-text


【解决方案1】:

我是这样做的:

speech_config = speechsdk.SpeechConfig(subscription=speech_key, 
                                   region=service_region, 
                                   speech_recognition_language="fr-FR")

audio_config = speechsdk.audio.AudioConfig(filename=filepath)

speech_recognizer = speechsdk.SpeechRecognizer(speech_config=speech_config, 
                                               audio_config=audio_config)
result = speech_recognizer.recognize_once()

print(result.reason, result.text)

【讨论】:

    猜你喜欢
    • 2023-01-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多