diff --git a/api/@ohos.multimedia.audio.d.ts b/api/@ohos.multimedia.audio.d.ts index 0704102f7a0e3608e56ea10d6015552fcc0c3a68..6a134226d4c25d016e3a50e0715860eee7f4cec3 100644 --- a/api/@ohos.multimedia.audio.d.ts +++ b/api/@ohos.multimedia.audio.d.ts @@ -535,6 +535,12 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Core */ STREAM_USAGE_VOICE_COMMUNICATION = 2, + /** + * Voice assistant broadcast usage. + * @since 9 + * @syscap SystemCapability.Multimedia.Audio.Core + */ + STREAM_USAGE_VOICE_ASSISTANT = 3, /** * Notification or ringtone usage. * @since 7 @@ -1399,6 +1405,20 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Renderer */ getStreamInfo(): Promise; + /** + * Obtains the renderer stream id. This method uses an asynchronous callback to return the result. + * @param callback Callback used to return the stream id. + * @since 9 + * @syscap SystemCapability.Multimedia.Audio.Renderer + */ + getAudioStreamId(callback: AsyncCallback): void; + /** + * Obtains the renderer stream id. This method uses a promise to return the result. + * @return Promise used to return the stream id. + * @since 9 + * @syscap SystemCapability.Multimedia.Audio.Renderer + */ + getAudioStreamId(): Promise; /** * Starts the renderer. This method uses an asynchronous callback to return the result. * @param callback Callback used to return the result. @@ -1612,6 +1632,12 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Core */ SOURCE_TYPE_MIC = 0, + /** + * Voice recognition source type. + * @since 9 + * @syscap SystemCapability.Multimedia.Audio.Core + */ + SOURCE_TYPE_VOICE_RECOGNITION = 1, /** * Voice communication source type. * @since 8 @@ -1704,6 +1730,21 @@ declare namespace audio { */ getStreamInfo(): Promise; + /** + * Obtains the capturer stream id. This method uses an asynchronous callback to return the result. + * @param callback Callback used to return the stream id. + * @since 9 + * @syscap SystemCapability.Multimedia.Audio.Renderer + */ + getAudioStreamId(callback: AsyncCallback): void; + /** + * Obtains the capturer stream id. This method uses a promise to return the result. + * @return Promise used to return the stream id. + * @since 9 + * @syscap SystemCapability.Multimedia.Audio.Renderer + */ + getAudioStreamId(): Promise; + /** * Starts capturing. This method uses an asynchronous callback to return the result. * @param callback Callback used to return the result.