speechd-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get rid of lengthy pause at end of sentences for speechSynthe


From: guest271314
Subject: Re: How to get rid of lengthy pause at end of sentences for speechSynthesis.speak()?
Date: Sat, 24 Aug 2024 17:48:30 -0700

I've posted how I've done things, exactly.

I'm testing the feasibility of using window.speechSynthesis.speak()
and Speech Dispatcher at all for speech syntehsis on the Web.

I don't have to.

I've done this other ways without this kind of issue without using a
speech synthesis interfrace, which as I see it, can be caused by some
latency or other speech synthesis interface code.

Or, can be the browser.

I have not elimiated either so far.

I have not given up on updating Web Speech API, even though I can use
speech syntehsis engines without Speech Dispatcher on any arbitrary
Web page I want, different ways.

You will have to reproduce on Chromium to observe what I am observing.

Run this in console in Chromium. I'm on Version 130.0.6677.0
(Developer Build) (64-bit)

wget --show-progress --progress=bar --output-document chrome.zip
https://download-chromium.appspot.com/dl/Linux_x64?type=snapshots &&
unzip chrome.zip && rm chrome.zip

wget --show-progress --progress=bar -H -O piper.tar.gz
'https://github.com/rhasspy/piper/releases/download/2023.11.14-2/piper_linux_x86_64.tar.gz'
&& tar -xf piper.tar.gz && rm piper.tar.gz

The voices and JSON files

https://huggingface.co/diffusionstudio/piper-voices/resolve/main/en/en_US/hfc_male/medium/en_US-hfc_male-medium.onnx

https://huggingface.co/diffusionstudio/piper-voices/resolve/main/en/en_US/hfc_male/medium/en_US-hfc_male-medium.onnx.json

https://huggingface.co/diffusionstudio/piper-voices/resolve/main/en/en_US/hfc_female/medium/en_US-hfc_female-medium.onnx

https://huggingface.co/diffusionstudio/piper-voices/resolve/main/en/en_US/hfc_female/medium/en_US-hfc_female-medium.onnx.json



Place the attached piper.conf and speechd.conf files in their
respective expected locations after running spd-conf -u.

Launch chromium with chrome --enable-speech-dispatcher, run this in
console. It may take running a couple times before Speech Dispatcher
loads the voices

var voices = speechSynthesis.getVoices().filter(({name}) =>
name.includes("piper"));
var u = new SpeechSynthesisUtterance();
u.voice = voices[1];
u.text = "Test, test, test. Test to the point it breaks.";
speechSynthesis.speak(u);

console.log(JSON.stringify(voices.map(({default:_default, lang,
localService, name, voiceURI}) => ({_default, lang, localService,
name, voiceURI})), null, 2));

If you don't want to install and use the Deno code I posted, you can
use this at the commandline

echo 'Test, test, test. Test to the point it breaks.' | ./piper/piper
-q --length_scale 1 --sentence_silence 0 --model
./en_US-hfc_male-medium.onnx --output_raw | aplay -r 22050 -f S16_LE
-t raw -

Compare to the output on Chromium or Chrome browsers via Speech Dispatcher.

On Sat, Aug 24, 2024 at 5:21 PM Samuel Thibault
<samuel.thibault@ens-lyon.org> wrote:
>
> guest271314, le sam. 24 août 2024 17:11:55 -0700, a ecrit:
> >  GenericDelimiters "|"
> >
> > doesn't change anything.
>
> It doesn't seem to be taken into account, see piper.log:
>
>  Sat Aug 24 17:08:25 2024 [937405]: Configuration (pre) has been read from 
> "/home/xubuntu/.config/speech-dispatcher/modules/piper.conf"
>
>  Sat Aug 24 17:08:25 2024 [937464]: GenericMaxChunkLength = 300
>
>  Sat Aug 24 17:08:25 2024 [937506]: GenericDelimiters = .
>
> Are you editing the right file?
>
> (yes, "works for me")
>
> > And that is clearly not symbolically related to eliminating extended
> > silence between sentences.
>
> ? Of course it is, it's the delimiter between utterances.
>
> > It would require some serious divination to reach that conclusion.
>
> I can assure you that in the past hours I have had to spend a lot on
> divination to try to find out how you did things exactly.
>
> Samuel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]