Open jruiz94 opened 1 week ago
I'd like to add that I'm open to try to help implementing this (if it's possible to implement, maybe it's not) however I've never contributed to Godot before so if anyone could give me some tips on where to start (like a contributing guide or something), that'd be great thanks in advance
This is not technically feasible, as the audio from TTS is output by the operating system itself. Godot has no knowledge of this audio and cannot manipulate it in any way.
On the bright side, this also allows projects that can't output audio (e.g. those using the Dummy
audio driver) to make use of TTS.
As a reminder, TTS is meant to be an accessibility feature, not a way to act as a character voiceover. This is why volume control is always left in the hands of the user, and users needing TTS will generally configure it in their system settings. Moreover, the TTS implementation is OS-specific, so the output will sound different on each platform.
Aaah I see. I kinda suspected it'd be this way but I just wanted to ask anyways to be fully sure.
Thanks again for your time i assume this can be closed and left for future reference if anybody stumbles upon this.
Cheers!
Describe the project you are working on
I'm planning to make a game where robotic voice is needed for the narration of the game. I'm prerecording some segments so I don't need to use text-to-speech but I'd like the game to be able to "speak" the name the player set up at the beggining, even if it's a different voice
Describe the problem or limitation you are having in your project
The volume of the tts_speak() function is not at the same level of the rest of the in-game audio, typically resulting in lower volume, and I can't adjust it higher than the maximum 100 that the function tts_speak() provides. Also I didn't think of this when I was implementing my game, but having the ability to add some audio effects to it would be a huge plus.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
If the audio can be routeable to audio buses, I can amplify the volume and/or add effects
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Add a parameter to the tts_speak() function so you can specify an AudioBus
If this enhancement will not be used often, can it be worked around with a few lines of script?
No, currently the tts_speak() function doesn't allow routing the audio to a bus, so I'm stuck to the maximum 100 volume.
Is there a reason why this should be core and not an add-on in the asset library?
Addons can't modify the default behaviour of a built-in Godot function AFAIK