InputAudioBufferResource Class
Resource for input audio buffer management.
Initialize an input audio buffer resource.
Constructor
InputAudioBufferResource(connection: VoiceLiveConnection)
Parameters
| Name | Description |
|---|---|
|
connection
Required
|
The VoiceLiveConnection to use. |
Methods
| append |
Append audio to the input buffer. |
| clear |
Clear the input audio buffer. |
| commit |
Commit the input audio buffer. Creates a new user message item in the conversation. |
append
Append audio to the input buffer.
async append(*, audio: str, event_id: str | None = None) -> None
Keyword-Only Parameters
| Name | Description |
|---|---|
|
audio
|
Base64-encoded audio data in the format declared by the session config. |
|
event_id
|
Optional ID for the event. Default value: None
|
Returns
| Type | Description |
|---|---|