Skip to content

Audio capture fails on USB microphone with unsupported sample format (I8) #20

@yegorpeony

Description

@yegorpeony

Description

When starting Keyless with my USB microphone, the app successfully loads the Whisper model and tokenizer, but fails to initialize audio capture. The log indicates that the chosen sample format is I8, which is not supported

Steps to Reproduce

  1. Start Terminal Keyless
  2. Select any model and press enter

Platform

Linux

Version

0.3.0

Logs

INFO keyless_whisper::model::loader: loading tokenizer path=/home/yegor/.cache/keyless/models/openai--whisper-tiny/tokenizer.json
 INFO keyless_whisper::model::loader: tokenizer loaded
 INFO keyless_whisper::model::loader: token IDs resolved
 INFO keyless_whisper::model::loader: generating mel filters
 INFO keyless_whisper::model::loader: mel filters generated
 INFO keyless_whisper::whisper::worker_thread: initializing rubato resampler source_hz=48000 target_hz=16000
 INFO keyless_audio::sfx::player: sfx output stream started sample_rate_hz=44100.0 channels=2
DEBUG keyless_audio::input::cpal: chosen_sample_rate_final_frame_samples chosen_sample_rate=48000 final_frame_samples=4800
DEBUG keyless_audio::input::cpal: Sample format: I8
ERROR keyless_runtime::pipeline::startup: audio capture start failed error=audio error: audio error: unsupported sample format device=USB PnP Audio Device


 INFO keyless_whisper::model::loader: loading tokenizer path=/home/yegor/.cache/keyless/models/openai--whisper-tiny/tokenizer.json
 INFO keyless_whisper::model::loader: tokenizer loaded
 INFO keyless_whisper::model::loader: token IDs resolved
 INFO keyless_whisper::model::loader: generating mel filters
 INFO keyless_whisper::model::loader: mel filters generated
 INFO keyless_whisper::whisper::worker_thread: initializing rubato resampler source_hz=48000 target_hz=16000
 INFO keyless_audio::sfx::player: sfx output stream started sample_rate_hz=44100.0 channels=2
DEBUG keyless_audio::input::cpal: chosen_sample_rate_final_frame_samples chosen_sample_rate=48000 final_frame_samples=4800
DEBUG keyless_audio::input::cpal: Sample format: I8
ERROR keyless_runtime::pipeline::startup: audio capture start failed error=audio error: audio error: unsupported sample format device=Canyon CNS-CWC5 Webcam


 INFO keyless_whisper::model::loader: loading tokenizer path=/home/yegor/.cache/keyless/models/openai--whisper-tiny/tokenizer.json
 INFO keyless_whisper::model::loader: tokenizer loaded
 INFO keyless_whisper::model::loader: token IDs resolved
 INFO keyless_whisper::model::loader: generating mel filters
 INFO keyless_whisper::model::loader: mel filters generated
 INFO keyless_whisper::whisper::worker_thread: initializing rubato resampler source_hz=48000 target_hz=16000
 INFO keyless_audio::sfx::player: sfx output stream started sample_rate_hz=44100.0 channels=2
DEBUG keyless_audio::input::cpal: chosen_sample_rate_final_frame_samples chosen_sample_rate=48000 final_frame_samples=4800
DEBUG keyless_audio::input::cpal: Sample format: I8
ERROR keyless_runtime::pipeline::startup: audio capture start failed error=audio error: audio error: unsupported sample format device=HD-Audio Generic

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions