feature/precode (#2)

- Implent support to play precoded files
- Implement a basic client -server architecture

Reviewed-on: https://gitea.pstruebi.xyz/auracaster/bumble-auracast/pulls/2
This commit was merged in pull request #2.
This commit is contained in:
2025-03-04 10:21:53 +01:00
parent 77c47c39cb
commit dc8b6cc66e
27 changed files with 495 additions and 86 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

25
src/auracast/testdata/encode_lc3.py vendored Normal file
View File

@@ -0,0 +1,25 @@
# use liblc3
import os
import subprocess
frame_dur_ms=10
srate=16000
bps=32000
if __name__ == '__main__':
workdir = os.path.dirname(__file__)
os.chdir(workdir)
files = os.listdir(workdir)
filtered = [file for file in files if file.endswith('.wav')]
for file in filtered:
cmd = [
'elc3',
'-b', f'{bps}',
'-m', f'{frame_dur_ms}' ,
'-r', f'{srate}',
f'{file}', f'{file.replace('.wav', '')}_{frame_dur_ms}_{srate//1000}_{bps//1000}.lc3'
]
print("Executing: ", " ".join(cmd))
ret = subprocess.run(cmd, check=True)
print(ret.returncode, ret.stdout, ret.stderr)