SpeechTranslationConfig.setSpeechSynthesisOutputFormat() in Java SDK doesn't work
Slimek Wu
1
Reputation point
Hi
I'm trying Java Speech SDK 1.14.0 for speech translation on Android. I use SpeechTranslationConfig to create a TranslationRecognizer:
AudioConfig audio = AudioConfig.fromDefaultMicrophoneInput();
SpeechTranslationConfig config = SpeechTranslationConfig.fromSubscription(
subscriptionKey,
subscriptionRegion
);
config.setSpeechRecognitionLanguage(sourceLanguage);
config.addTargetLanguage(targetLanguage);
config.setSpeechSynthesisLanguage(targetLanguage);
config.setVoiceName(voiceName);
config.setSpeechSynthesisOutputFormat(SpeechSynthesisOutputFormat.Raw16Khz16BitMonoPcm);
this.recognizer = new TranslationRecognizer(config, audio);
...
Everything is fine, except that no mater what I set in setSpeechSynthesisOutputFormat(), it always gives me the audio in Riff16Khz16BitMonoPcm format, which seems to be the default value.
Is there any other way to specify the speech synthesis output format?
Sign in to answer