fix issue in prev commit for microsoft

This commit is contained in:
Dave Horton
2023-04-01 13:19:27 -04:00
parent 0d58954537
commit d606141f57
3 changed files with 4 additions and 6 deletions
+1 -3
View File
@@ -170,8 +170,6 @@ async function synthAudio(client, logger, stats, { account_sid,
client.setexAsync(key, EXPIRES, audioBuffer.toString('base64'))
.catch((err) => logger.error(err, `error calling setex on key ${key}`));
if (['microsoft'].includes(vendor)) return {filePath, servedFromCache, rtt};
}
return new Promise((resolve, reject) => {
@@ -325,9 +323,9 @@ const synthMicrosoft = async(logger, {
reject(cancellation.errorDetails);
break;
case ResultReason.SynthesizingAudioCompleted:
stats.increment('tts.count', ['vendor:microsoft', 'accepted:yes']);
resolve(Buffer.from(result.audioData));
synthesizer.close();
stats.increment('tts.count', ['vendor:microsoft', 'accepted:yes']);
break;
default:
logger.info({result}, 'synthAudio: (Microsoft) unexpected result');
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "@jambonz/speech-utils",
"version": "0.0.11",
"version": "0.0.12",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@jambonz/speech-utils",
"version": "0.0.11",
"version": "0.0.12",
"license": "MIT",
"dependencies": {
"@aws-sdk/client-polly": "^3.303.0",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@jambonz/speech-utils",
"version": "0.0.11",
"version": "0.0.12",
"description": "TTS-related speech utilities for jambonz",
"main": "index.js",
"author": "Dave Horton",