langchain_community.utilities.nvidia_riva
.AudioStream¶
- class langchain_community.utilities.nvidia_riva.AudioStream(maxsize: int = 0)[source]¶
A message containing streaming audio.
Initialize the queue.
Attributes
complete
Indicate if the audio stream has hungup and been processed.
empty
Indicate in the input stream buffer is empty.
hungup
Indicate if the audio stream has hungup.
running
Indicate if the ASR stream is running.
output
hangup
user_talking
user_quiet
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: Optional[int] = None) None [source]¶
Async send the hangup signal.
- Parameters
timeout (Optional[int]) –
- Return type
None
- async aput(item: Union[bytes, SentinelT], timeout: Optional[int] = None) None [source]¶
Async put a new item into the queue.
- Parameters
item (Union[bytes, SentinelT]) –
timeout (Optional[int]) –
- Return type
None
- close(timeout: Optional[int] = None) None [source]¶
Send the hangup signal.
- Parameters
timeout (Optional[int]) –
- Return type
None