Skip to content

USB Audio Inputs are not recognized #125

@pvandrunen

Description

@pvandrunen

I thought that I would try this app out to resolve an issue I've found with both iOS and Android, that is USB microphones or USB audio input devices are, in general, not supported in the browser — and therefore my capacitor app.

Reported on iOS (safari) https://bugs.webkit.org/show_bug.cgi?id=211192
Reported for Android (chromium) https://bugs.chromium.org/p/chromium/issues/detail?id=1178521

Unfortunately I have experienced the same behavior with this plugin, on both iOS and Android the plugin only ever captures audio from the mobile devices internal microphone.

I had the impression that in both iOS and Android that the audio device was managed at the os level and so it should just default to the USB audio interface once it is plugged in?

I have tested several USB audio interfaces, they work consistently in native apps such as the iOS "Voice Memos" app and Androids "Recorder" app.

In my use case I am using the event listener to get chunks of audio and sending them off to an API for transcription.

I may be able to sponsor this fix.

function recordInput() {

  window.addEventListener( "audioinput", streamData, false );

  audioinput.start({
    streamToWebAudio: false,
    sampleRate: 16000,
    bufferSize: 8192,
    channels: audioinput.CHANNELS.MONO,
    format: audioinput.FORMAT.PCM_16BIT,
    audioSourceType: audioinput.AUDIOSOURCE_TYPE.DEFAULT,
  });

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions