Fixed-sized audio buffer with variable internal length.
Definition at line 35 of file vad.py.
◆ __init__()
| None homeassistant.components.assist_pipeline.vad.AudioBuffer.__init__ |
( |
|
self, |
|
|
int |
maxlen |
|
) |
| |
Initialize buffer.
Definition at line 38 of file vad.py.
◆ __bool__()
| bool homeassistant.components.assist_pipeline.vad.AudioBuffer.__bool__ |
( |
|
self | ) |
|
Return True if there are bytes in the buffer.
Definition at line 69 of file vad.py.
◆ __len__()
| int homeassistant.components.assist_pipeline.vad.AudioBuffer.__len__ |
( |
|
self | ) |
|
Get the number of bytes currently in the buffer.
Definition at line 65 of file vad.py.
◆ append()
| None homeassistant.components.assist_pipeline.vad.AudioBuffer.append |
( |
|
self, |
|
|
bytes |
data |
|
) |
| |
Append bytes to the buffer, increasing the internal length.
Definition at line 52 of file vad.py.
◆ bytes()
| bytes homeassistant.components.assist_pipeline.vad.AudioBuffer.bytes |
( |
|
self | ) |
|
Convert written portion of buffer to bytes.
Definition at line 61 of file vad.py.
◆ clear()
| None homeassistant.components.assist_pipeline.vad.AudioBuffer.clear |
( |
|
self | ) |
|
Clear the buffer.
Definition at line 48 of file vad.py.
◆ length()
| int homeassistant.components.assist_pipeline.vad.AudioBuffer.length |
( |
|
self | ) |
|
Get number of bytes currently in the buffer.
Definition at line 44 of file vad.py.
◆ _buffer
| homeassistant.components.assist_pipeline.vad.AudioBuffer._buffer |
|
private |
◆ _length
| homeassistant.components.assist_pipeline.vad.AudioBuffer._length |
|
private |
The documentation for this class was generated from the following file:
- core/homeassistant/components/assist_pipeline/vad.py