From 139e188c4b69c85fa97bbd1a7ceea15038df35a6 Mon Sep 17 00:00:00 2001 From: Il Harper Date: Sat, 7 Sep 2024 15:25:57 +0800 Subject: [PATCH] fix(api): fix audio duration --- .../engine-chronocat-api/src/api/message/create/messager.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/engine-chronocat-api/src/api/message/create/messager.ts b/packages/engine-chronocat-api/src/api/message/create/messager.ts index 68d5c47..d11b864 100644 --- a/packages/engine-chronocat-api/src/api/message/create/messager.ts +++ b/packages/engine-chronocat-api/src/api/message/create/messager.ts @@ -284,7 +284,9 @@ export class Messager { this.children.push( r.remoteAudio( amrFile, - encodeResult.duration ? Math.ceil(encodeResult.duration) : 1, + encodeResult.duration + ? Math.ceil(encodeResult.duration / 100) + : 1, encodeResult.waveAmplitudes, ), )