Can't play Custom Neural Voice

Anastasia Germanova 0 Reputation points
2023-01-26T23:22:17.8666667+00:00

Hello,
Can't play custom voice because of the error = Unsupported voice CustomVoiceNeural. websocket error code: 1007

Code for fetching:

` async function synthesizeSpeech(responseText) {
const speechConfig = sdk.SpeechConfig.fromSubscription(YOUR_SUBSCRIPTION_KEY, SPEECH_REGION);
const audioConfig = sdk.AudioConfig.fromDefaultSpeakerOutput();

speechConfig.speechSynthesisOutputFormat = sdk.SpeechSynthesisOutputFormat.Audio24Khz160KBitRateMonoMp3;
speechConfig.speechSynthesisVoiceName = "CustomVoiceNeural";

const synthesizer = new sdk.SpeechSynthesizer(speechConfig, audioConfig);
synthesizer.speakTextAsync(
  responseText,
  result => {
    if (result) {
      synthesizer.close();
      console.log(result)
      setAudioSrc(result.audioData);
      return result.audioData;
    }
  },
  error => {
    console.log(error);
    synthesizer.close();
  });
Azure AI Speech
Azure AI Speech
An Azure service that integrates speech processing into apps and services.
1,271 questions
{count} votes