19 lines
424 B
Python
19 lines
424 B
Python
|
|
#!/usr/bin/env python3
|
||
|
|
"""
|
||
|
|
Simple RealtimeSTT Test Script
|
||
|
|
|
||
|
|
Test wake word detection and transcription functionality
|
||
|
|
without the complexity of threading and status bar apps.
|
||
|
|
"""
|
||
|
|
|
||
|
|
from RealtimeSTT import AudioToTextRecorder
|
||
|
|
|
||
|
|
def process_text(text):
|
||
|
|
print(text)
|
||
|
|
|
||
|
|
if __name__ == '__main__':
|
||
|
|
print("Wait until it says 'speak now'")
|
||
|
|
recorder = AudioToTextRecorder()
|
||
|
|
|
||
|
|
while True:
|
||
|
|
recorder.text(process_text)
|