【问题标题】:IBM Watson Text to Speech API PythonIBM Watson 文本到语音 API Python
【发布时间】:2021-01-02 07:52:22
【问题描述】:

我正在尝试调整 IBM Watson 的音调,但我似乎找不到任何关于此的文档。

If you visit this link 然后你可以看到有一个调整俯仰/速度的选项。

我的代码很简单:

from ibm_watson import TextToSpeechV1
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator

authenticator = IAMAuthenticator('api_key')
text_to_speech = TextToSpeechV1(
    authenticator=authenticator
)

text_to_speech.set_service_url('service_url')

sample = "insert what you want to say here"

with open('test.wav', 'wb') as audio_file:
    audio_file.write(
        text_to_speech.synthesize(
            sample,
            voice='en-GB_JamesV3Voice',
            accept='audio/wav'
        ).get_result().content)

我真的不知道要调整哪些参数才能使声音变低。非常感谢!

【问题讨论】:

    标签: python text-to-speech ibm-watson


    【解决方案1】:

    您正在寻找的是prosody element。神经语音 (V3) 仅使用 pitchrate 属性。

    使用您的示例:

    sample = 'Here is a <prosody pitch="150Hz"> modified pitch </prosody> example.'
    
    sample = 'Here is a <prosody rate="x-slow"> modified rate </prosody> example.'
    

    【讨论】:

      【解决方案2】:

      【讨论】:

        猜你喜欢
        • 2019-06-23
        • 1970-01-01
        • 1970-01-01
        • 2016-07-02
        • 1970-01-01
        • 2021-07-07
        • 2019-03-23
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多