VoiceLiveSession.SendInputAudioAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| SendInputAudioAsync(BinaryData, CancellationToken) |
Transmits audio data from BinaryData. |
| SendInputAudioAsync(Byte[], CancellationToken) |
Transmits audio data from a byte array. |
| SendInputAudioAsync(Stream, CancellationToken) |
Transmits audio data from a stream, ending the client turn once the stream is complete. |
SendInputAudioAsync(BinaryData, CancellationToken)
- Source:
- VoiceLiveSession.cs
- Source:
- VoiceLiveSession.cs
Transmits audio data from BinaryData.
public virtual System.Threading.Tasks.Task SendInputAudioAsync(BinaryData audio, System.Threading.CancellationToken cancellationToken = default);
abstract member SendInputAudioAsync : BinaryData * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.SendInputAudioAsync : BinaryData * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overridable Function SendInputAudioAsync (audio As BinaryData, Optional cancellationToken As CancellationToken = Nothing) As Task
Parameters
- audio
- BinaryData
The audio data to transmit.
- cancellationToken
- CancellationToken
An optional cancellation token.
Returns
A task that represents the asynchronous operation.
Exceptions
Thrown when audio is null.
Thrown when another audio stream is already being sent.
Applies to
SendInputAudioAsync(Byte[], CancellationToken)
- Source:
- VoiceLiveSession.cs
- Source:
- VoiceLiveSession.cs
Transmits audio data from a byte array.
public virtual System.Threading.Tasks.Task SendInputAudioAsync(byte[] audio, System.Threading.CancellationToken cancellationToken = default);
abstract member SendInputAudioAsync : byte[] * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.SendInputAudioAsync : byte[] * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overridable Function SendInputAudioAsync (audio As Byte(), Optional cancellationToken As CancellationToken = Nothing) As Task
Parameters
- audio
- Byte[]
The audio data to transmit.
- cancellationToken
- CancellationToken
An optional cancellation token.
Returns
A task that represents the asynchronous operation.
Exceptions
Thrown when audio is null.
Thrown when another audio stream is already being sent.
Applies to
SendInputAudioAsync(Stream, CancellationToken)
- Source:
- VoiceLiveSession.cs
- Source:
- VoiceLiveSession.cs
Transmits audio data from a stream, ending the client turn once the stream is complete.
public virtual System.Threading.Tasks.Task SendInputAudioAsync(System.IO.Stream audio, System.Threading.CancellationToken cancellationToken = default);
abstract member SendInputAudioAsync : System.IO.Stream * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.SendInputAudioAsync : System.IO.Stream * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overridable Function SendInputAudioAsync (audio As Stream, Optional cancellationToken As CancellationToken = Nothing) As Task
Parameters
- audio
- Stream
The audio stream to transmit.
- cancellationToken
- CancellationToken
An optional cancellation token.
Returns
A task that represents the asynchronous operation.
Exceptions
Thrown when audio is null.
Thrown when another audio stream is already being sent.