# cf_voice/cli.py — cf-voice-demo entry point import asyncio from cf_voice.context import ContextClassifier async def _run() -> None: print("cf-voice mock stream — Ctrl+C to stop\n") classifier = ContextClassifier.mock(interval_s=2.0) try: async for frame in classifier.stream(): reliable = "+" if frame.is_reliable() else "?" shift = " [SHIFT]" if frame.is_shift() else "" print( f"[{frame.timestamp:6.1f}s] {frame.speaker_id} " f"{frame.label:<30} conf={frame.confidence:.2f}{reliable}{shift}" ) except KeyboardInterrupt: pass finally: await classifier.stop() def demo() -> None: asyncio.run(_run())