From e6e3cc539b8745ea39040c40e0ba97e6b198accd Mon Sep 17 00:00:00 2001 From: Reuben Morais Date: Wed, 6 May 2020 12:03:14 +0200 Subject: [PATCH] Mark aNumResults parameters in *withMetadata methods as optional --- native_client/javascript/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/native_client/javascript/index.d.ts b/native_client/javascript/index.d.ts index b22141ca..dfe365cd 100644 --- a/native_client/javascript/index.d.ts +++ b/native_client/javascript/index.d.ts @@ -103,7 +103,7 @@ stt(aBuffer: object): string; * @return :js:func:`Metadata` object containing multiple candidate transcripts. Each transcript has per-token metadata including timing information. * The user is responsible for freeing Metadata by calling :js:func:`FreeMetadata`. Returns undefined on error. */ -sttWithMetadata(aBuffer: object, aNumResults: number): Metadata; +sttWithMetadata(aBuffer: object, aNumResults?: number): Metadata; /** * Create a new streaming inference state. One can then call :js:func:`Stream.feedAudioContent` and :js:func:`Stream.finishStream` on the returned stream object. @@ -143,7 +143,7 @@ intermediateDecode(aSctx: Stream): string; * * @return :js:func:`Metadata` object containing multiple candidate transcripts. Each transcript has per-token metadata including timing information. The user is responsible for freeing Metadata by calling :js:func:`FreeMetadata`. Returns undefined on error. */ -intermediateDecodeWithMetadata (aNumResults: number): Metadata; +intermediateDecodeWithMetadata (aNumResults?: number): Metadata; /** * Compute the final decoding of an ongoing streaming inference and return the result. Signals the end of an ongoing streaming inference. @@ -163,7 +163,7 @@ finishStream(): string; * * This method will free the stream, it must not be used after this method is called. */ -finishStreamWithMetadata(aNumResults: number): Metadata; +finishStreamWithMetadata(aNumResults?: number): Metadata; } /**