MCPcopy Index your code
hub / github.com/FunAudioLLM/Fun-ASR / main

Function main

client_python.py:210–229  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

208
209
210def main():
211 parser = argparse.ArgumentParser(description="Fun-ASR-Nano Python Client")
212 parser.add_argument("--server", type=str, default="ws://localhost:10095")
213 parser.add_argument("--mic", action="store_true", help="Use microphone input")
214 parser.add_argument("--file", type=str, help="Audio file to transcribe")
215 parser.add_argument("--hotwords", type=str, default="", help="Hotwords (comma-separated)")
216 parser.add_argument("--spk", action="store_true", default=True, help="Show speaker IDs")
217 parser.add_argument("--no-spk", dest="spk", action="store_false")
218 args = parser.parse_args()
219
220 if not args.mic and not args.file:
221 parser.error("Specify --mic or --file")
222
223 try:
224 if args.mic:
225 asyncio.run(run_mic(args))
226 else:
227 asyncio.run(run_file(args))
228 except KeyboardInterrupt:
229 print(f"\n{RESET}Interrupted.")
230
231
232if __name__ == "__main__":

Callers 1

client_python.pyFile · 0.70

Calls 2

run_micFunction · 0.85
run_fileFunction · 0.85

Tested by

no test coverage detected