diff --git a/typescript/audio2text/src/index.ts b/typescript/audio2text/src/index.ts index eac0f0f..61cceea 100644 --- a/typescript/audio2text/src/index.ts +++ b/typescript/audio2text/src/index.ts @@ -11,6 +11,7 @@ const app: ReadableApp = async function( return assembly.processFileFs().then(res => { this.logger.info("Result", res); + return res; }); }; diff --git a/typescript/audio2text/src/utils/assembly.ts b/typescript/audio2text/src/utils/assembly.ts index df2ebd5..0e5d83a 100644 --- a/typescript/audio2text/src/utils/assembly.ts +++ b/typescript/audio2text/src/utils/assembly.ts @@ -74,6 +74,7 @@ export class Assembly { if (result.status !== "completed") { this.logger.info(result.status); await defer(3000); + return this.transcript(); } @@ -82,11 +83,13 @@ export class Assembly { async processFileFs(): Promise { await this.uploadFromFs(); await this.startTranscript(); + return this.transcript(); } async processFile(inputStream: Readable): Promise { await this.upload(inputStream); await this.startTranscript(); + return this.transcript(); } }