mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
fixed a config parameter
This commit is contained in:
parent
8b4b2efd27
commit
89c5651702
1 changed files with 5 additions and 5 deletions
10
tnc/sock.py
10
tnc/sock.py
|
@ -415,14 +415,14 @@ class ThreadedTCPRequestHandler(socketserver.StreamRequestHandler):
|
||||||
def tnc_set_record_audio(self, received_json):
|
def tnc_set_record_audio(self, received_json):
|
||||||
try:
|
try:
|
||||||
if not AudioParam.audio_record:
|
if not AudioParam.audio_record:
|
||||||
AudioParam.audio_record_FILE = wave.open(f"{int(time.time())}_audio_recording.wav", 'w')
|
AudioParam.audio_record_file = wave.open(f"{int(time.time())}_audio_recording.wav", 'w')
|
||||||
AudioParam.audio_record_FILE.setnchannels(1)
|
AudioParam.audio_record_file.setnchannels(1)
|
||||||
AudioParam.audio_record_FILE.setsampwidth(2)
|
AudioParam.audio_record_file.setsampwidth(2)
|
||||||
AudioParam.audio_record_FILE.setframerate(8000)
|
AudioParam.audio_record_file.setframerate(8000)
|
||||||
AudioParam.audio_record = True
|
AudioParam.audio_record = True
|
||||||
else:
|
else:
|
||||||
AudioParam.audio_record = False
|
AudioParam.audio_record = False
|
||||||
AudioParam.audio_record_FILE.close()
|
AudioParam.audio_record_file.close()
|
||||||
|
|
||||||
command_response("respond_to_call", True)
|
command_response("respond_to_call", True)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue