Share via

StatusCode="FailedPrecondition", Detail="Voice does not match"

Wysocki Michal 6 Reputation points
2022-08-15T10:53:18.32+00:00

Hi
We deployed the Cognitive Services container and trying to convert text to speech using SpeechSDK.

Our code:
var speechConfig = SpeechConfig.FromHost(new Uri("ws://localhost:5000"));

using (var speechSynthesizer = new SpeechSynthesizer(speechConfig))
{
var speechSynthesisResult = await speechSynthesizer.SpeakSsmlAsync(Ssml);

OutputSpeechSynthesisResult(speechSynthesisResult, Ssml);  

}

SSML:
<speak xmlns="http://www.w3.org/2001/10/synthesis" xmlns:mstts="http://www.w3.org/2001/mstts" xmlns:emo="http://www.w3.org/2009/10/emotionml" version="1.0" xml:lang="en-US"><voice name="en-GB-LibbyNeural">
Welcome to Microsoft Cognitive Services <break time="100ms" /> Text-to-Speech API.
</voice></speak>

We get the following error:

Connection was closed by the remote host. Error code: 1007. Error details: Status(StatusCode="FailedPrecondition", Detail="Voice does not match") USP state: 3. Received audio size: 0 bytes.

Do you know what is causing this error?

Regards,
Mike

Foundry Tools
Foundry Tools

Formerly known as Azure AI Services or Azure Cognitive Services is a unified collection of prebuilt AI capabilities within the Microsoft Foundry platform


1 answer

Sort by: Most helpful
  1. Rohit Mungi 49,131 Reputation points Microsoft Employee Moderator
    2022-08-16T11:00:23.31+00:00

    @Wysocki Michal The text to speech API is available on host URL http://localhost:5000, I think you could check the same by updating your speechConfig endpoint.
    ws://localhost:5000 is used for speech to text container.

    Please ensure to run the neural text to speech container before using the endpoint running on port 80. Please check this section for details.

    docker pull mcr.microsoft.com/azure-cognitive-services/speechservices/neural-text-to-speech:latest  
    

    If an answer is helpful, please click on 130616-image.png or upvote 130671-image.png which might help other community members reading this thread.

    Was this answer helpful?

    0 comments No comments

Your answer

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