From ab7d14528882c317602ace16c6815ada2904815e Mon Sep 17 00:00:00 2001 From: Quan HL Date: Sat, 1 Apr 2023 13:39:33 +0700 Subject: [PATCH] fix: microsft retrun arrayBuffer not buffer, convert it now to buffer --- lib/synth-audio.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/synth-audio.js b/lib/synth-audio.js index 119e14a..b2c491c 100644 --- a/lib/synth-audio.js +++ b/lib/synth-audio.js @@ -326,7 +326,7 @@ const synthMicrosoft = async(logger, { break; case ResultReason.SynthesizingAudioCompleted: stats.increment('tts.count', ['vendor:microsoft', 'accepted:yes']); - resolve(result.audioData); + resolve(Buffer.from(result.audioData)); synthesizer.close(); break; default: