pied icon indicating copy to clipboard operation
pied copied to clipboard

Pied wipes speech dispatcher config

Open C-Loftus opened this issue 8 months ago • 2 comments

Thank you for your work on this repo. I was hoping to use it with the Orca screen reader but unfortunately in my testing I am finding that upon installing a voice it wipes the speech dispatcher config located at ~/.config/speech-dispatcher. This is a problem for non-visual users since speech dispatcher is tricky to configure and when the config is wiped, all the synthesizers need to be reconfigured. Very often a user will want to switch between synthesizers quickly and just having one like piper installed at a time makes this a longer process to switch.

I tried to solve this myself but couldn't figure it out given some local issues building flatpak and my unfamiliarity with dart. Any tips would be much appreciated. I presume this is a simple fix just with path issues and would help a lot of visually impaired folks!

This is the cause of https://github.com/Elleo/pied/issues/25 , and prevents users from using other voices with other client apps using speech dispatcher

The screenshot below shows the config folder before running pied. Note how there are many modules and a full speechd.conf file with many options inside

config before running pied which shows many modules installed

However after running pied and selecting a voice from the GUI all of these modules are wiped. Its possible that this is the result of a files being moved or something analogous. Also once the config is applied the speechd.conf file becomes just the pied template and no longer contains any of the global settings the user had before

config after running pied which shows only piper and others deleted

C-Loftus avatar Feb 27 '25 03:02 C-Loftus

I saw that there is an existing discussion about a way to revert the install by moving the config back, but ideally, unless I'm missing something, can't you just append to the speech dispatcher config and not mutate / move anything else?

https://github.com/Elleo/pied/issues/17#issuecomment-2647598934

C-Loftus avatar Feb 27 '25 05:02 C-Loftus

(I don't see a reason for overwriting everything, if pied wants to update piper.conf, it can limit itself to that. Actually, the tendency is to just not have to modify a .conf file, and just auto-detect everything and let users choose the voice inside e.g. the orca configuration panel)

sthibaul avatar Mar 04 '25 17:03 sthibaul

I think to make pied work one needs both a piper.conf and some custom configs in speechd.conf. It for sure needs to add 'AddModule "piper-tts-generic" "sd_generic" "piper.conf"' to speechd.conf. Perhaps a default that could be explored could be creating a piper.conf (and retaining other voice configs). In regards to speechd.conf I'm not sure how non-intrusively one can change the config, it might be simplest to just backup the file and replace it with the default pied config. The pied config does include 'Include "clients/*.conf"' which seems to point that it could work with prior voice configs.

fpfcmsr avatar Nov 22 '25 01:11 fpfcmsr

It for sure needs to add 'AddModule "piper-tts-generic"

No.

Since a long time already speech-dispatcher just loads by default all modules it sees, so that users don't have to modify a file to be able to use a module that they have just installed. All an installer should need to do is to just install piper.conf and send SIGHUP to make speech-dispatcher look again and load the new module.

sthibaul avatar Nov 22 '25 11:11 sthibaul