diff --git a/lib/synth-audio.js b/lib/synth-audio.js index 514cb72..53b0eb4 100644 --- a/lib/synth-audio.js +++ b/lib/synth-audio.js @@ -331,8 +331,9 @@ async function _synthOnPremMicrosoft(logger, { } try { + const trimSilence = filePath.endsWith('.r8'); const post = bent('POST', 'buffer', { - 'X-Microsoft-OutputFormat': 'audio-16khz-128kbitrate-mono-mp3', + 'X-Microsoft-OutputFormat': trimSilence ? 'raw-8khz-16bit-mono-pcm' : 'audio-16khz-32kbitrate-mono-mp3', 'Content-Type': 'application/ssml+xml', 'User-Agent': 'Jambonz' });