ITADN

run_client.py: microphone input never works (no client created when no files provided)

#420OpenRohanMuppa 创建于 2026-02-15
R
RohanMuppacommented
## Bug `run_client.py` never creates a `TranscriptionClient` when no `--files` are provided, so microphone input silently does nothing. When no files are passed, `valid_files` is set to `[]`, and the only code that creates a client is: ```python for f in valid_files: client = TranscriptionClient(...) client(f) ``` This loop never executes when `valid_files` is empty, so the script prints "No files provided, using microphone input." and then exits without ever connecting to the server. ## Expected behavior When no `--files` are provided, the script should create a `TranscriptionClient` and call `client()` with no arguments, which triggers microphone recording via `self.record()` in the `__call__` method. ## Steps to reproduce ```bash python run_server.py python run_client.py # no --files flag ``` The client prints the "using microphone input" message and exits immediately without connecting to the server. ## Additional note There's also a duplicate print block (lines 77-79) that prints "Found 0 audio file(s) to stream:" even in the microphone case, which should be removed.
0 条评论