AudioStream#
- class langchain_community.utilities.nvidia_riva.AudioStream(maxsize: int = 0)[source]#
A message containing streaming audio.
Initialize the queue.
Attributes
completeIndicate if the audio stream has hungup and been processed.
emptyIndicate in the input stream buffer is empty.
hungupIndicate if the audio stream has hungup.
runningIndicate if the ASR stream is running.
Methods
__init__([maxsize])Initialize the queue.
aclose([timeout])Async send the hangup signal.
aput(item[,Β timeout])Async put a new item into the queue.
close([timeout])Send the hangup signal.
put(item[,Β timeout])Put a new item into the queue.
register(responses)Drain the responses from the provided iterator and put them into a queue.
- Parameters:
maxsize (int) β
- __init__(maxsize: int = 0) None[source]#
Initialize the queue.
- Parameters:
maxsize (int) β
- Return type:
None
- async aclose(timeout: int | None = None) None[source]#
Async send the hangup signal.
- Parameters:
timeout (int | None) β
- Return type:
None
- async aput(item: bytes | SentinelT, timeout: int | None = None) None[source]#
Async put a new item into the queue.
- Parameters:
item (bytes | SentinelT) β
timeout (int | None) β
- Return type:
None
- close(timeout: int | None = None) None[source]#
Send the hangup signal.
- Parameters:
timeout (int | None) β
- Return type:
None
Examples using AudioStream