mirror of
https://github.com/markqvist/LXST.git
synced 2025-12-22 10:57:08 +00:00
24 lines
487 B
Python
24 lines
487 B
Python
import sys
|
|
import time
|
|
import select
|
|
from LXST.Primitives.Recorders import FileRecorder
|
|
|
|
filename = "recording.opus"
|
|
|
|
# With default profile (maximum quality)
|
|
recorder = FileRecorder(filename)
|
|
|
|
# Or, with specific profile
|
|
# from LXST.Codecs import Opus
|
|
# recorder = FileRecorder(filename, profile=Opus.PROFILE_VOICE_MEDIUM)
|
|
|
|
recorder.start()
|
|
print("Recording started")
|
|
|
|
try: input()
|
|
except KeyboardInterrupt: pass
|
|
|
|
recorder.stop()
|
|
print(f"Recording saved to {filename}")
|
|
|
|
time.sleep(0.2) |