@jambonz/speech-utils 0.0.10 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -170,8 +170,6 @@ async function synthAudio(client, logger, stats, { account_sid,
170
170
 
171
171
  client.setexAsync(key, EXPIRES, audioBuffer.toString('base64'))
172
172
  .catch((err) => logger.error(err, `error calling setex on key ${key}`));
173
-
174
- if (['microsoft'].includes(vendor)) return {filePath, servedFromCache, rtt};
175
173
  }
176
174
 
177
175
  return new Promise((resolve, reject) => {
@@ -325,9 +323,9 @@ const synthMicrosoft = async(logger, {
325
323
  reject(cancellation.errorDetails);
326
324
  break;
327
325
  case ResultReason.SynthesizingAudioCompleted:
328
- stats.increment('tts.count', ['vendor:microsoft', 'accepted:yes']);
329
- resolve(result.audioData);
326
+ resolve(Buffer.from(result.audioData));
330
327
  synthesizer.close();
328
+ stats.increment('tts.count', ['vendor:microsoft', 'accepted:yes']);
331
329
  break;
332
330
  default:
333
331
  logger.info({result}, 'synthAudio: (Microsoft) unexpected result');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jambonz/speech-utils",
3
- "version": "0.0.10",
3
+ "version": "0.0.12",
4
4
  "description": "TTS-related speech utilities for jambonz",
5
5
  "main": "index.js",
6
6
  "author": "Dave Horton",