Can't play Custom Neural Voice
Anastasia Germanova
0
Reputation points
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();
});
Sign in to answer