Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USB Audio Inputs are not recognized #125

Open
pvandrunen opened this issue Sep 6, 2022 · 0 comments
Open

USB Audio Inputs are not recognized #125

pvandrunen opened this issue Sep 6, 2022 · 0 comments

Comments

@pvandrunen
Copy link

pvandrunen commented Sep 6, 2022

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,
  });

}
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

No branches or pull requests

1 participant