The Cognitive Services Speech SDK has no sound on iPhone’s Safari, but can play successfully on Mac’s Safari. How should this be handled?(in react)
const initializeSynthesizer = () => {
const speechConfig = SpeechSDK.SpeechConfig.fromSubscription(KEY, REGION);
const audioConfig = SpeechSDK.AudioConfig.fromDefaultSpeakerOutput();
const synthesizer = new SpeechSDK.SpeechSynthesizer(speechConfig, audioConfig);
setSynthesizer(synthesizer);
}
const synthesizeSpeech = () => {
if (synthesizer) {
synthesizer.synthesizing = (s, e) => {
console.log(e.result.privReason)
};
synthesizer.speakTextAsync(
text,
result => {
console.log(result)
},
error => {
console.error('Error synthesizing speech: ', error);
}
);
}
};
Need I use different AudioConfig on iphone’s safari?
New contributor
JESSE Bin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.