Azure-Samples / cognitive-services-speech-sdk

Sample code for the Microsoft Cognitive Services Speech SDK
MIT License
2.97k stars 1.86k forks source link

Python Implementation of TTS Avatar is not working as expected #2540

Open selvaraj-sembulingam opened 3 months ago

selvaraj-sembulingam commented 3 months ago

Describe the bug Python Implementation of TTS Avatar is not working as expected

To Reproduce

Steps to reproduce the behavior:

  1. Followed the exact steps mentioned in the readme of the basic usage of Azure text-to-speech avatar real-time API.

Expected behavior

Avatar loads when Start Session button is clicked.

Version of the Cognitive Services Speech SDK

Which version of the SDK are you using. azure-cognitiveservices-speech==1.40.0

Platform, Operating System, and Programming Language

Additional context

P.S. Javascript Implementation is working perfectly fine

yulin-li commented 3 months ago

Thanks for using azure avatar and reporting this issue. @yinhew could you help to check?

yinhew commented 3 months ago

Hi, @selvaraj-sembulingam

Did you observe any error message on server side (printed by python code)?

Thanks, Yinhe

selvaraj-sembulingam commented 3 months ago

@yinhew

After clicking StartSession below are the logs

❯ python -m flask run -h 0.0.0.0 -p 5000
 * Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on all addresses (0.0.0.0)
 * Running on http://127.0.0.1:5000
 * Running on http://x.x.x.x:5000
Press CTRL+C to quit
127.0.0.1 - - [15/Aug/2024 18:02:34] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [15/Aug/2024 18:02:34] "GET /static/css/styles.css HTTP/1.1" 304 -
127.0.0.1 - - [15/Aug/2024 18:02:34] "GET /static/js/basic.js HTTP/1.1" 200 -
127.0.0.1 - - [15/Aug/2024 18:02:46] "GET /api/getIceToken HTTP/1.1" 200 -
127.0.0.1 - - [15/Aug/2024 18:02:49] "GET /static/css/styles.css HTTP/1.1" 304 -
Result id for avatar connection: 03cc4fxxxxxxxxxxxxxxxxxxe3d16
127.0.0.1 - - [15/Aug/2024 18:02:52] "POST /api/connectAvatar HTTP/1.1" 200 -

No response for few minutes and then got the below logs

Info: on_underlying_io_bytes_received: Close frame received
Info: on_underlying_io_bytes_received: received close frame, sending a close response frame.
Info: on_underlying_io_close_sent: uws_client=0x11e71b180, io_send_result:0
Info: on_underlying_io_close_sent: closing underlying io.
Info: on_underlying_io_close_complete: uws_state: 6.

Thanks

yinhew commented 3 months ago

@selvaraj-sembulingam can you send a mail to avatarvoice@microsoft.com with above Result Id shared?

github-actions[bot] commented 2 months ago

This item has been open without activity for 19 days. Provide a comment on status and remove "update needed" label.

meetneuron commented 2 weeks ago

Same issue: After clicking Open Avatar session nothing happens. Followed all the steps. PS C:\agent\avatar> python -m flask run -h 0.0.0.0 -p 5000

yinhew commented 2 weeks ago

Hi, @meetneuron

Based on your result id, looks you were using East US region, where avatar is not enabled. Avatar is currently enabled on 7 regions: Southeast Asia, North Europe, West Europe, Sweden Central, South Central US, East US 2, West US 2

Check here for our related doc: https://learn.microsoft.com/en-us/azure/ai-services/speech-service/text-to-speech-avatar/what-is-text-to-speech-avatar#available-locations

Thanks, Yinhe