Merge pull request #31 from jambonz/fix/onprem-azure

fix raw audio downloaded from onprem azure
This commit is contained in:
Dave Horton
2023-09-08 07:57:36 -04:00
committed by GitHub

View File

@@ -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'
});