From 5d4ec30240888eca557682c2d7ea70826feeb79d Mon Sep 17 00:00:00 2001 From: chmjkb Date: Tue, 17 Jun 2025 08:14:55 +0200 Subject: [PATCH] fix: ensure audioLanguage is passed to decodeChunk --- .../src/controllers/SpeechToTextController.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/react-native-executorch/src/controllers/SpeechToTextController.ts b/packages/react-native-executorch/src/controllers/SpeechToTextController.ts index c34d3759dd..0bfb4156a9 100644 --- a/packages/react-native-executorch/src/controllers/SpeechToTextController.ts +++ b/packages/react-native-executorch/src/controllers/SpeechToTextController.ts @@ -327,7 +327,10 @@ export class SpeechToTextController { this.validateAndFixLastChunk(); for (let chunkId = 0; chunkId < this.chunks.length; chunkId++) { - const seq = await this.decodeChunk(this.chunks!.at(chunkId)!); + const seq = await this.decodeChunk( + this.chunks!.at(chunkId)!, + audioLanguage + ); // whole audio is inside one chunk, no processing required if (this.chunks.length === 1) { this.sequence = seq;