Error code: 1007. Error details: Invalid deploymentId state: TurnStarted. Received audio size: 0 bytes.

Zhou, Jie (周杰) 20 Reputation points
2023-12-11T07:29:49.6233333+00:00

aUser's image

after train a speech model, endpoint deployed successfully, but run the code:

custom model:

speech_config = speechsdk.SpeechConfig(subscription="****", region="eastus")

speech_config.endpoint_id = '****'

audio_output_config = speechsdk.audio.AudioOutputConfig(use_default_speaker=True)

audio_config = speechsdk.audio.AudioConfig(use_default_microphone=True)

Should be the locale for the speaker's language.

speech_config.speech_recognition_language="en-US"

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

The language of the voice that responds on behalf of Azure OpenAI.

speech_config.speech_synthesis_voice_name='en-US-JennyMultilingualNeural'

speech_synthesizer = speechsdk.SpeechSynthesizer(speech_config=speech_config, audio_config=audio_output_config)

error:
Speech synthesis canceled: CancellationReason.Error

Error details: Connection was closed by the remote host. Error code: 1007. Error details: Invalid deploymentId 4f9223a8-d03b-492b-8e0e-399ce6434cd1 USP state: TurnStarted. Received audio size: 0 bytes.

how to fix it ?

Azure AI Speech
Azure AI Speech
An Azure service that integrates speech processing into apps and services.
2,061 questions
Azure
Azure
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
1,409 questions
{count} votes

Accepted answer
  1. dupammi 8,615 Reputation points Microsoft External Staff
    2023-12-13T05:09:18.75+00:00

    Hi @Zhou, Jie (周杰) ,

    I hope you got the resolution from your prior comments.

    To help others in the community, let me reiterate the solution here by jotting down the gist of my comment answer above.

    Please try to use speak_ssml_async, for testing. If speak_ssml_async is working perfectly, it means all your configuration values are also perfectly provided by you in your code.

    The code snippet mentioned in my previous response, is what I tried at my end for testing my custom model and it works as expected.

    Hope this helps.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.