watson-developer-cloud/python-sdk

TTS: Handshake Status 403 Forbidden

nathannzw opened this issue · 17 comments

voices = service.list_voices().get_result()
print(json.dumps(voices, indent=2))

voice = service.get_voice('zh-CN_ZhangJingVoice').get_result()
print(json.dumps(voice, indent=2))

service.synthesize_using_websocket(#SSML_text,
                                   "你好, 需要什么帮忙吗?",
                                   test_callback,
                                   accept='audio/wav',
                                   voice="zh-CN_ZhangJingVoice"
                                  )

Getting the voice does show that particular Chinese voice model.
Synthesizing causes a handshake error - English voice works.

I assume it's because the Chinese voice isn't showing up from the list voices function.

Why is this so??

Can someone else help me verify this?

Using this voice should work when using WebSocket, can you provide more info on your auth setup? 403 looks like an issue related to the incorrect service endpoints.

@mamoonraja here:

#text-to-speech    
tts = IAMAuthenticator("xxxxxxxx7pGI7mTrJ0WjMiQi2z9TSj4hGDKei")
service = TextToSpeechV1(authenticator=tts)
service.set_service_url('https://api.jp-tok.text-to-speech.watson.cloud.ibm.com/instances/xxxxxxxxbd8-a574-a1b54d6558c9')

@mamoonraja If it is related to the endpoints, why does it work for English voice and not the Chinese one?

oh ok, the same thing works for English. Interesting, I was going that way cause we have seen 403 cause of url issues before.

I was able to reproduce the issue. Looks like a service issue, we will investigate and get back to you. Meanwhile, you can use recognize instead of recognize_using_websocket because that worked with the Chinese language.

Ok, good to hear. Thanks!

@mamoonraja and you mean synthesize right?

oh yes, my bad.

@nathannzw were you able to solve the issue with using synthesize?

Hello! I am also interested in using websocket to get text to speech from IBM with the chinese voices. I want to obtain the timestamps, but I also get a 403 error. I have checked with a wide range of languages and see it supports more common languages like english, french and portugese. Is there any other way to obtain the timestamps?

Hello I am also having this issue. Has anyone figured it out?

Looking into this issue again, we have located the source of the error and determined a viable solution. We expect a patch release for this in the coming days

This issue has been patched in version 5.2.1. Closing as resolved

This issue has been patched in version 5.2.1. Closing as resolved

Can you please explain what you mean with 5.2.1
I have the same problem and don´t know how to fix it.

Using version 5.2.1 of the ibm-watson python package has the necessary patch and will resolve this issue for you