Skip to content

examples: add whisper-mic example with docs and unix-only gating#3714

Open
nickhuang99 wants to merge 29 commits intoggml-org:masterfrom
nickhuang99:nick-microphone
Open

examples: add whisper-mic example with docs and unix-only gating#3714
nickhuang99 wants to merge 29 commits intoggml-org:masterfrom
nickhuang99:nick-microphone

Conversation

@nickhuang99
Copy link
Copy Markdown

Summary

This PR integrates a new whisper-mic example for interactive microphone transcription and aligns it with existing project conventions.

What Changed

  • Added examples/mic/whisper-mic.cpp as a buildable example target.
  • Refactored argument handling to match the style used in other examples (help/options parsing).
  • Improved runtime robustness:
    • model/context/device initialization checks
    • empty-audio guard before inference
    • error handling on recognition failure
  • Improved stop behavior:
    • progress display now stops immediately when recording is stopped
    • short tail capture is kept to avoid clipping the last syllable
  • Aligned mic CMake integration with upstream example style.
  • Added mic documentation and listed the example in the root examples table.
  • Limited mic example build inclusion to Unix-like platforms (UNIX AND NOT WIN32) to keep Windows builds clean for now.

Validation

  • CPU build:
    • cmake --build build_mic --target whisper-mic
  • GPU build:
    • cmake --build build_gpu_mic --target whisper-mic
  • Runtime verification on Linux:
    • confirmed model load and successful microphone transcription
    • confirmed CUDA backend initialization in GPU build

Notes

  • Windows support for this specific mic example is intentionally deferred; the target is currently gated out on Win32.

…ing project naming and structure conventions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant