startAudioConversation

actual suspend fun startAudioConversation(functionCallHandler: (FunctionCallPart) -> FunctionResponsePart?)(source)

Starts an audio conversation with the model, which can only be stopped using stopAudioConversation or close.

Parameters

functionCallHandler

A callback function that is invoked whenever the model receives a function call. The FunctionResponsePart that the callback function returns will be automatically sent to the model.


actual suspend fun startAudioConversation(functionCallHandler: (FunctionCallPart) -> FunctionResponsePart?, enableInterruptions: Boolean)(source)

Starts an audio conversation with the model, which can only be stopped using stopAudioConversation or close.

Parameters

functionCallHandler

A callback function that is invoked whenever the model receives a function call. The FunctionResponsePart that the callback function returns will be automatically sent to the model.

enableInterruptions

If enabled, allows the user to speak over or interrupt the model's ongoing reply.

WARNING: The user interruption feature relies on device-specific support, and may not be consistently available.


actual suspend fun startAudioConversation(functionCallHandler: (FunctionCallPart) -> FunctionResponsePart?, transcriptHandler: (Transcription?, Transcription?) -> Unit?, enableInterruptions: Boolean)(source)

Starts an audio conversation with the model, which can only be stopped using stopAudioConversation or close.

Parameters

functionCallHandler

A callback function that is invoked whenever the model receives a function call. The FunctionResponsePart that the callback function returns will be automatically sent to the model.

transcriptHandler

A callback function that is invoked whenever the model receives a transcript. The first Transcription object is the input transcription, and the second is the output transcription.

enableInterruptions

If enabled, allows the user to speak over or interrupt the model's ongoing reply.

WARNING: The user interruption feature relies on device-specific support, and may not be consistently available.


actual suspend fun startAudioConversation(functionCallHandler: (FunctionCallPart) -> FunctionResponsePart?, transcriptHandler: (Transcription?, Transcription?) -> Unit?, goAwayHandler: (LiveServerGoAway) -> Unit?, enableInterruptions: Boolean)(source)

Starts an audio conversation with the model, which can only be stopped using stopAudioConversation or close.

Parameters

functionCallHandler

A callback function that is invoked whenever the model receives a function call. The FunctionResponsePart that the callback function returns will be automatically sent to the model.

transcriptHandler

A callback function that is invoked whenever the model receives a transcript. The first Transcription object is the input transcription, and the second is the output transcription.

goAwayHandler

A callback function that is invoked when the server initiates a disconnect via a LiveServerGoAway message. This allows the application to handle server-initiated session termination gracefully.

enableInterruptions

If enabled, allows the user to speak over or interrupt the model's ongoing reply.

WARNING: The user interruption feature relies on device-specific support, and may not be consistently available.


actual suspend fun startAudioConversation(liveAudioConversationConfig: LiveAudioConversationConfig)(source)

Starts an audio conversation with the model, which can only be stopped using stopAudioConversation or close.

Parameters

liveAudioConversationConfig

A LiveAudioConversationConfig provided by the user to control the various aspects of the conversation.

expect suspend fun startAudioConversation(functionCallHandler: (FunctionCallPart) -> FunctionResponsePart? = null)(source)

Starts an audio conversation with the model, which can only be stopped using stopAudioConversation or close.

Parameters

functionCallHandler

A callback function that is invoked whenever the model receives a function call. The FunctionResponsePart that the callback function returns will be automatically sent to the model.


expect suspend fun startAudioConversation(functionCallHandler: (FunctionCallPart) -> FunctionResponsePart? = null, enableInterruptions: Boolean = false)(source)

Starts an audio conversation with the model, which can only be stopped using stopAudioConversation or close.

Parameters

functionCallHandler

A callback function that is invoked whenever the model receives a function call. The FunctionResponsePart that the callback function returns will be automatically sent to the model.

enableInterruptions

If enabled, allows the user to speak over or interrupt the model's ongoing reply.

WARNING: The user interruption feature relies on device-specific support, and may not be consistently available.


expect suspend fun startAudioConversation(functionCallHandler: (FunctionCallPart) -> FunctionResponsePart? = null, transcriptHandler: (Transcription?, Transcription?) -> Unit? = null, enableInterruptions: Boolean = false)(source)

Starts an audio conversation with the model, which can only be stopped using stopAudioConversation or close.

Parameters

functionCallHandler

A callback function that is invoked whenever the model receives a function call. The FunctionResponsePart that the callback function returns will be automatically sent to the model.

transcriptHandler

A callback function that is invoked whenever the model receives a transcript. The first Transcription object is the input transcription, and the second is the output transcription.

enableInterruptions

If enabled, allows the user to speak over or interrupt the model's ongoing reply.

WARNING: The user interruption feature relies on device-specific support, and may not be consistently available.


expect suspend fun startAudioConversation(functionCallHandler: (FunctionCallPart) -> FunctionResponsePart? = null, transcriptHandler: (Transcription?, Transcription?) -> Unit? = null, goAwayHandler: (LiveServerGoAway) -> Unit? = null, enableInterruptions: Boolean = false)(source)

Starts an audio conversation with the model, which can only be stopped using stopAudioConversation or close.

Parameters

functionCallHandler

A callback function that is invoked whenever the model receives a function call. The FunctionResponsePart that the callback function returns will be automatically sent to the model.

transcriptHandler

A callback function that is invoked whenever the model receives a transcript. The first Transcription object is the input transcription, and the second is the output transcription.

goAwayHandler

A callback function that is invoked when the server initiates a disconnect via a LiveServerGoAway message. This allows the application to handle server-initiated session termination gracefully.

enableInterruptions

If enabled, allows the user to speak over or interrupt the model's ongoing reply.

WARNING: The user interruption feature relies on device-specific support, and may not be consistently available.


expect suspend fun startAudioConversation(liveAudioConversationConfig: LiveAudioConversationConfig)(source)

Starts an audio conversation with the model, which can only be stopped using stopAudioConversation or close.

Parameters

liveAudioConversationConfig

A LiveAudioConversationConfig provided by the user to control the various aspects of the conversation.

actual suspend fun startAudioConversation(functionCallHandler: (FunctionCallPart) -> FunctionResponsePart?)(source)

Starts an audio conversation with the model, which can only be stopped using stopAudioConversation or close.

Parameters

functionCallHandler

A callback function that is invoked whenever the model receives a function call. The FunctionResponsePart that the callback function returns will be automatically sent to the model.


actual suspend fun startAudioConversation(functionCallHandler: (FunctionCallPart) -> FunctionResponsePart?, enableInterruptions: Boolean)(source)

Starts an audio conversation with the model, which can only be stopped using stopAudioConversation or close.

Parameters

functionCallHandler

A callback function that is invoked whenever the model receives a function call. The FunctionResponsePart that the callback function returns will be automatically sent to the model.

enableInterruptions

If enabled, allows the user to speak over or interrupt the model's ongoing reply.

WARNING: The user interruption feature relies on device-specific support, and may not be consistently available.


actual suspend fun startAudioConversation(functionCallHandler: (FunctionCallPart) -> FunctionResponsePart?, transcriptHandler: (Transcription?, Transcription?) -> Unit?, enableInterruptions: Boolean)(source)

Starts an audio conversation with the model, which can only be stopped using stopAudioConversation or close.

Parameters

functionCallHandler

A callback function that is invoked whenever the model receives a function call. The FunctionResponsePart that the callback function returns will be automatically sent to the model.

transcriptHandler

A callback function that is invoked whenever the model receives a transcript. The first Transcription object is the input transcription, and the second is the output transcription.

enableInterruptions

If enabled, allows the user to speak over or interrupt the model's ongoing reply.

WARNING: The user interruption feature relies on device-specific support, and may not be consistently available.


actual suspend fun startAudioConversation(functionCallHandler: (FunctionCallPart) -> FunctionResponsePart?, transcriptHandler: (Transcription?, Transcription?) -> Unit?, goAwayHandler: (LiveServerGoAway) -> Unit?, enableInterruptions: Boolean)(source)

Starts an audio conversation with the model, which can only be stopped using stopAudioConversation or close.

Parameters

functionCallHandler

A callback function that is invoked whenever the model receives a function call. The FunctionResponsePart that the callback function returns will be automatically sent to the model.

transcriptHandler

A callback function that is invoked whenever the model receives a transcript. The first Transcription object is the input transcription, and the second is the output transcription.

goAwayHandler

A callback function that is invoked when the server initiates a disconnect via a LiveServerGoAway message. This allows the application to handle server-initiated session termination gracefully.

enableInterruptions

If enabled, allows the user to speak over or interrupt the model's ongoing reply.

WARNING: The user interruption feature relies on device-specific support, and may not be consistently available.


actual suspend fun startAudioConversation(liveAudioConversationConfig: LiveAudioConversationConfig)(source)

Starts an audio conversation with the model, which can only be stopped using stopAudioConversation or close.

Parameters

liveAudioConversationConfig

A LiveAudioConversationConfig provided by the user to control the various aspects of the conversation.