Skip to content

Commit

Permalink
Changed the audio format
Browse files Browse the repository at this point in the history
  • Loading branch information
mcasperson committed Jan 30, 2022
1 parent 5f5f486 commit 0794df2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public byte[] translateText(final String input, final String targetLanguage) thr
System.getenv("SPEECH_KEY"),
System.getenv("SPEECH_REGION"))) {
speechConfig.setSpeechSynthesisLanguage(targetLanguage);
speechConfig.setSpeechSynthesisOutputFormat(SpeechSynthesisOutputFormat.Riff24Khz16BitMonoPcm);
speechConfig.setSpeechSynthesisOutputFormat(SpeechSynthesisOutputFormat.Webm24Khz16Bit24KbpsMonoOpus);

final SpeechSynthesizer synthesizer = new SpeechSynthesizer(speechConfig, null);
final SpeechSynthesisResult result = synthesizer.SpeakText(input);
Expand Down

0 comments on commit 0794df2

Please sign in to comment.