use 16kHz sampling rate

This commit is contained in:
2024-12-18 16:54:49 +01:00
parent bca4b94442
commit daa2d92257
4 changed files with 55 additions and 42 deletions

View File

@@ -1,10 +1,12 @@
import subprocess
import logging as log
def encode_lc3(file):
def encode_lc3(file, frame_dur_ms=10, bps=48000):
file = file.replace('.wav', '')
ret = subprocess.run(['elc3', '-b', '48000', f'{file}.wav', f'{file}.lc3'], check=True)
cmd = ['elc3', '-m', f'{frame_dur_ms}' , '-b', f'{bps}', f'{file}.wav', f'{file}.lc3']
log.info("Executing: %s", " ".join(cmd))
ret = subprocess.run(cmd, check=True)
return ret.returncode, ret.stdout, ret.stderr