79744541

Date: 2025-08-23 20:08:45
Score: 0.5
Natty:
Report link

The key here, is I am using a specialized audio source in my project, which is Blackhole virtual mixer, and the general use constructor TranslationRecognizer(...) is not capable of handling a more complex MediaStream that is not just the built-in microphone for example.

So, in order to setup and audioConfig with a non-standard audio source, such as Blackhole loopback audio, a MediaStream you need to you use the factory.

TranslationRecognizer.fromConfig(speechTranslationConfig, AutoDetectLanguageConfig, AudioConfig). 

Gemini 2.5

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: serxio