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

Browser source SpeechSynthesis audio is not recorded when "Control audio via OBS" is selected #404

Open
Edrem opened this issue Mar 8, 2023 · 3 comments

Comments

@Edrem
Copy link

Edrem commented Mar 8, 2023

Operating System Info

Windows 10

Other OS

No response

OBS Studio Version

29.0.2

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/OXxpPl8wZ7n4t9ts

OBS Studio Crash Log URL

No response

Expected Behavior

SpeechSynthesis done inside a browser when set to "Control Audio via OBS" should be recorded on it's own audio channel in OBS, as well as be monitored if the monitor setting is enabled in Advanced Audio

Current Behavior

OBS should be able to both record and monitor the speechsynthesis audio generated by a browser source when "Control Audio via OBS" is enabled, instead it simply records nothing.

The browser source is capable of generating speechsynthesis audio when the option is off, that however goes through Desktop Audio/Default Output and is not ideal for my recording setup.

Steps to Reproduce

  1. Add a new browser source pointing to Mozilla SpeechSynthesis demo page (https://mdn.github.io/dom-examples/web-speech-api/speak-easy-synthesis/)
  2. Set the source property "Control Audio via OBS" to true
  3. In Advanced Audio properties for the browser sauce, set Audio Monitoring to Monitor Only/Monitor and Output
  4. Using the Interact tool with the browser sauce, type in some text and click Play.

Anything else we should know?

Thank you whoever made the Analyzer of OBS log files. It's most likely unrelated to this issue but I can see now some other performance settings in OBS I was never aware of.

@pkviet
Copy link
Member

pkviet commented Mar 8, 2023

I can indeed repro the issue. It's unfortunately probably not fixable on our side. The audio capture functions are never called. This points to cef (chromium embedded framework) which we rely on for obs-browser.
Could you try a speech synthesis which auto starts as soon as the page is open ? Maybe this would work.

@nofuture2077
Copy link

I can reproduce the error on Mac OS. One thing to add: The SpeechSynthesis doesn't even start when audio is controlled by obs.

const audio = new SpeechSynthesisUtterance("Test Message");
audio.addEventListener('start', () => {
    //...
});
speechSynthesis.speak(audio);

So the audio starts and start event is fired when "Control audio via OBS" is disabled, but doesn't if it is checked.

@Dizziness17
Copy link

I have same issue with this. I used Web Speech API and it works on chrome but not obs. Did anyone solved this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants