From 86c2b4664c9e3e0c996b9c33053d1fa81004826b Mon Sep 17 00:00:00 2001 From: lvqiang214 Date: Mon, 28 Apr 2025 19:21:49 +0800 Subject: [PATCH] api Signed-off-by: lvqiang214 --- api/@ohos.ai.intelligentVoice.d.ts | 41 ++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/api/@ohos.ai.intelligentVoice.d.ts b/api/@ohos.ai.intelligentVoice.d.ts index 2b8c50f0f0..d99c57492c 100755 --- a/api/@ohos.ai.intelligentVoice.d.ts +++ b/api/@ohos.ai.intelligentVoice.d.ts @@ -982,6 +982,19 @@ declare namespace intelligentVoice { * @systemapi * @since 10 */ + /** + * Enrolls for result, This method uses an asynchronous callback to return the result. + * @permission ohos.permission.MANAGE_INTELLIGENT_VOICE and ohos.permission.MICROPHONE + * @param { boolean } isLast - isLast indicates if it is the last time to enroll. + * @param { AsyncCallback } callback - the callback used to return the result. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Not system application. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. + * @throws { BusinessError } 22700107 - System error. + * @syscap SystemCapability.AI.IntelligentVoice.Core + * @systemapi + * @since 19 + */ enrollForResult(isLast: boolean, callback: AsyncCallback): void; /** * Enrolls for result, This method uses a promise to return the result. @@ -995,6 +1008,19 @@ declare namespace intelligentVoice { * @systemapi * @since 10 */ + /** + * Enrolls for result, This method uses a promise to return the result. + * @permission ohos.permission.MANAGE_INTELLIGENT_VOICE and ohos.permission.MICROPHONE + * @param { boolean } isLast - isLast indicates if it is the last time to enroll. + * @returns { Promise } the promise used to return the result. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Not system application. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. + * @throws { BusinessError } 22700107 - System error. + * @syscap SystemCapability.AI.IntelligentVoice.Core + * @systemapi + * @since 19 + */ enrollForResult(isLast: boolean): Promise; /** * Stops the engine, This method uses an asynchronous callback to return the result. @@ -1366,6 +1392,21 @@ declare namespace intelligentVoice { * @systemapi * @since 12 */ + /** + * Starts the capturer. This method uses a promise to return the result. + * @permission ohos.permission.MANAGE_INTELLIGENT_VOICE and ohos.permission.MICROPHONE + * @param { number } channels - the channels needed in reading. The channels should be greater than 0 and smaller than 16. + * @returns { Promise } the promise used to return the result. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Not system application. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. 3.Parameter verification failed. + * @throws { BusinessError } 22700102 - Invalid parameter. + * @throws { BusinessError } 22700105 - Start capturer failed. + * @throws { BusinessError } 22700107 - System error. + * @syscap SystemCapability.AI.IntelligentVoice.Core + * @systemapi + * @since 19 + */ startCapturer(channels: number): Promise; /** * Reads the buffer from wakeup engine. This method uses a promise to return the result. -- Gitee