Transcriber#
- class Transcriber(default_microphone: str = 'list')[source]#
Bases:
objectReal-time transcription of user microphone input
Methods
Clear the recording buffer
Get speech recognition microphone device
Return the most recent single phrase of microphone input
Attributes
How real-time the recording is.
Delay before ending user monologue.
Microphone energy threshold for background noise.
Default microphone name.
The last time a recording was retreived from the queue.
Current raw audio bytes.
Thread-safe Queue for passing data from the threaded recording callback.
SpeechRecognizer to record and detect when speech ends.
File for sending to OpenAI Whisper API.
- data_queue: Queue#
Thread-safe Queue for passing data from the threaded recording callback.
- default_microphone: str#
Default microphone name.
- energy_threshold: int#
Microphone energy threshold for background noise.
- last_sample: bytes#
Current raw audio bytes.
- phrase_time: datetime | None#
The last time a recording was retreived from the queue.
- phrase_timeout: float#
Delay before ending user monologue.
- record_timeout: float#
How real-time the recording is.
- recorder: Recognizer#
SpeechRecognizer to record and detect when speech ends.
- temp_file: str#
File for sending to OpenAI Whisper API.