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

Foliate won't use piper options? #1370

Open
Ovi329 opened this issue Jul 31, 2024 · 1 comment
Open

Foliate won't use piper options? #1370

Ovi329 opened this issue Jul 31, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Ovi329
Copy link

Ovi329 commented Jul 31, 2024

Describe the bug
I'm trying to use foliate with Piper-tts and eliminate the 2-3s pause between sentences. My speechd.conf is

Timeout 30                                                                   
LogLevel  2                                                                  
LogDir  "default"                                                            
                                                                                    
DefaultVolume 100                                                            
DefaultVoiceType "FEMALE1"                                                     
DefaultLanguage   en-US
DefaultPunctuationMode "some"                                                
                                                                                    
SymbolsPreproc "char"
#SymbolsPreprocFile "gender-neutral.dic"
#SymbolsPreprocFile "font-variants.dic" 
SymbolsPreprocFile "symbols.dic"   
SymbolsPreprocFile "emojis.dic"    
#SymbolsPreprocFile "orca.dic"
#SymbolsPreprocFile "orca-chars.dic"
       
DefaultCapLetRecognition  "none"
DefaultSpelling  Off
                                                                                    
AudioOutputMethod   pulse
AudioPulseDevice "default"            
AudioPulseMinLength 10 
       
AddModule "piper"                   "sd_generic"   "piper.conf"
       
DefaultModule   piper
                                                                             
LanguageDefaultModule "en"  "piper"
#LanguageDefaultModule "fr"  "piper"
                                             
                                             
Include "clients/*.conf" 

my piper.conf file is

Debug 1

GenericExecuteSynth "echo '$DATA' | piper --sentence_silence 0.5 --output-raw --model ~/.local/share/piper/voices/en_US-lessac-high.onnx | aplay -r 22050 -f S16_LE -t raw -"
# only use medium quality voices to respect the 22050 rate for aplay in the command above.

GenericCmdDependency "piper"
GenericCmdDependency "aplay"
GenericCmdDependency "printf"
GenericSoundIconFolder "/usr/share/sounds/sound-icons/"

GenericPunctNone ""
GenericPunctSome "--punct=\"()<>[]{}\""
GenericPunctMost "--punct=\"()[]{};:\""
GenericPunctAll "--punct"

#GenericStripPunctChars  ""

GenericLanguage  "en" "en_US" "utf-8"
#GenericLanguage  "fr" "fr_FR" "utf-8"

#AddVoice        "en"    "MALE1"         "en_US-hfc_male-medium.onnx"
AddVoice        "en"    "FEMALE1"       "en_US-lessac-high.onnx"
#AddVoice        "fr"    "MALE1"         "fr_FR-upmc-medium.onnx -s 1"
#AddVoice        "fr"    "FEMALE1"       "fr_FR-upmc-medium.onnx"

DefaultVoice    "en_US-lessac-high.onnx"

#GenericRateForceInteger 1
#GenericRateAdd 1
#GenericRateMultiply 100

in piper.conf the --sentence_silence 0.5 option is not recognized. This is used to stop the 2-3s pause between sentences which occurs in piper tts. when i run

echo 'Summer crammed the harbor with noise and sunlight. It was eleven thirty. The day split open down the middle, crushing the docks under the burden of its heat. Moored at the sheds of the Algiers Municipal Depot, black-hulled, red-chimneyed freighters were loading sacks of wheat. Their dusty fragrance mingled with the powerful smell of tar melting under a hot sun.' | piper --output-raw --sentence_silence 0.5 --model ~/.local/share/piper/voices/en_US-lessac-high.onnx | aplay -r 22050 -f S16_LE -t raw -

for example (which is in piper.conf) in terminal, it works as expected and there's a 0.5s pause as expected. But when i use the tts in foliate it doesn't recognize the --sentence_silence 0.5 option i set up in piper.conf.

To Reproduce
Steps to reproduce the behavior:

  1. Install piper-tts download this file speechd.conf_and_piper.conf.zip and place the speechd.conf in /home/avijit/.config/speech-dispatcher and piper.conf in /home/avijit/.config/speech-dispatcher/modules
  2. Download .onnx and .onnx.json files and store them in ~/.local/share/piper/voices/
  3. If tts and speech-dispatcher doesn't work in foliate, then kill speech dispatcher from system monitor and run speech-dispatcher -t 0
  4. You will see that even after using --sentence_silence 0.5, there's a 2-3s pause between sentences.

Version:

  • Foliate version: 3.1.1
  • OS/Distribution and version: Ubuntu 24.04
  • Desktop environment: GNOME 46
  • Installation method: snap
@Ovi329 Ovi329 added the bug Something isn't working label Jul 31, 2024
@Ovi329
Copy link
Author

Ovi329 commented Jul 31, 2024

And I Also have this error when running foliate and sudo /usr/lib/snapd/snap-discard-ns foliate doesn't work for me.

(com.github.johnfactotum.Foliate:207383): com.github.johnfactotum.Foliate-WARNING **: 11:53:39.361: Error: Requiring Tracker, version none: Typelib file for namespace 'Tracker' (any version) not found
getURIFromTracker@resource:///com/github/johnfactotum/Foliate/library.js:83:24
get@resource:///com/github/johnfactotum/Foliate/library.js:121:42
getBookFromIdentifier@resource:///com/github/johnfactotum/Foliate/library.js:169:36
getBook@resource:///com/github/johnfactotum/Foliate/library.js:166:21
activate@resource:///com/github/johnfactotum/Foliate/library.js:860:63
activate@resource:///com/github/johnfactotum/Foliate/library.js:386:18
_init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266:34
  

** (com.github.johnfactotum.Foliate:207383): WARNING **: 11:53:39.389: Could not open /sys/class/dmi/id/chassis_type: Failed to open file “/sys/class/dmi/id/chassis_type”: Permission denied

** (com.github.johnfactotum.Foliate:207383): WARNING **: 11:53:39.389: Could not open /sys/firmware/acpi/pm_profile: Failed to open file “/sys/firmware/acpi/pm_profile”: Permission denied

** (process:207529): WARNING **: 11:53:40.179: Could not open /sys/class/dmi/id/chassis_type: Failed to open file “/sys/class/dmi/id/chassis_type”: Permission denied

** (process:207529): WARNING **: 11:53:40.179: Could not open /sys/firmware/acpi/pm_profile: Failed to open file “/sys/firmware/acpi/pm_profile”: Permission denied

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant