-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
How can I set another output soundcard for "say" command? #27
Comments
I did a bit of investigation to try to find a solution. I have a few leads but I'm not sure if any of them will work at present. I downloaded the source files for gnustep-gui-runtime and took a look at the source code for say. It's written in Objective-C (which I'm not particularly familiar with) and uses the associated sound interfaces (NSSpeechSynthesizer and NSSound). I.e. it creates a speech object
and then actually does the speech here
The documentation for NSSpeechSynthesizer is here where it states it outputs sound through the "system's default sound output device" but doesn't indicate how to find/change that. The NSSound documentation has more clues since it features a The remaining problem presumably would be actually finding the device identifiers on your system and then adding the ability to change that to the say source files. |
This is just a guess, but maybe the "default sound output device" on Linux would be pulled from PulseAudio? @speedy-software-ch maybe you can try (if you haven't already) setting a default audio device in /etc/pulse/default.pa by adding the line It feels like a long shot, but I don't know where else it would be getting a system default from. |
Try importing speechrecognition as sr in python |
On my laptop "say" command works as intended even though i have two sound outputs (Normal and HDMI audio). Due to me recording and producing music too, on my desktop PC i have the normal Soundcard installed in the Tower (which i don't use), and an external one connected over USB. I can switch to which device i wanna use in ubuntu over pulseaudio selection, or even alsa, but it doesn't change which soundcard "say" command is using for output. Is there a way to define that somewhere? if yes maybe we could even add that as a feature to Virtual-Assistant. Help anyone?
The text was updated successfully, but these errors were encountered: