Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am trying to have create WAV on ITU G.711 mu-law, mono 8 khz format but they are coming out silent:

def text_to_speach(text, audio_voice, output_file):
    """
    Converts Text to speach using IBM Watson
    """    
   
    apikey = <mykey>

    url = <myURL>

    # Setup Service
    authenticator = IAMAuthenticator(apikey)
    tts = TextToSpeechV1(authenticator=authenticator)
    tts.set_service_url(url)

    with open(output_file, "wb") as audio_file:
        res = tts.synthesize(text, accept="audio/mulaw;rate=8000", voice=audio_voice).get_result()

        audio_file.write(res.content)

    print("Done!!!")

Please advise.

question from:https://stackoverflow.com/questions/65945550/ibm-watson-text-to-spech-wave-codec

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
229 views
Welcome To Ask or Share your Answers For Others

1 Answer

Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...