[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Txt2pho - or let's Python!
From: |
Bohdan R . Rau |
Subject: |
Txt2pho - or let's Python! |
Date: |
Mon, 05 Dec 2011 09:54:25 +0100 |
On Sun, 4 Dec 2011 12:31:17 +0100, Halim Sahin wrote:
> Hi Bohdan,
>
Hi!
Thanks for you remarks. New (slightly corrected) version you can find
at:
http://tts.polip.com/files/spd/python_txt2pho-0.1.1.tar.gz
> Well some Questions about the txt2pho module:
> It's not clear to my how sd_txt2pho selects the voices.
> After copieing the conf file to ~/.sd_txt2pho I've modiefied the
> voicepath.
> After starting the module it selected de2 but de2 isn't listed in the
> ~/.sd_txt2pho config file.
> However I've have de6 and de7 in my voicepath.
sd_txt2pho knows basic parameters (gender, samplerate) of six known to
me German voices and automatically loads all voices found in path,
giving arbitrary names. So first found male voice (in your case 'de2')
will be default.
In configuration file you can only rename voices, not enable or
disable.
It should be parameter in configuration to select which voice (voices)
will be default, for example:
default voices = de6 de7
What you think?
At now you can look at beginning of GerSpeaker class in sd_txt2pho.py
file and move de6 to first position in _german_vlist.
>
> Audio works fine but I don't know if it's libao or pulse :-(.
I added logginng used audio method, so you will be able to check it
near top of log file.
For today audio is maximally simplified (it selects 'pulse' driver if
you had 'pulse' in main speechd config or 'ao' if you have something
else), but it will be changed in next version (I have working audio
selector in my milvona module, so I must only rewrite it in Python
and add extra parameters to Spda class initializer).
>
> Differences between sd_txt2pho and eg. sd_espeak:
> Mbrola says blank when typing on the tty.
> Other modules don't. Now I replaced blank by '' in germanizer.py to
> avoid this :-).
Wrong! It will break spelling mode of module!
It was bug in Phonetizer class, now you won't hear blank echoed. Also
there is new parameter 'announce blank' in configuration (may be someone
want to hear 'blank' when pressing space).
>
> The germanizer.py needs some improovements but I.ll provided an
> updated
> version if you are interested :-).
Yes of course!
But I think the Latinizer class must be improved first, as many
improvements will be common for most languages, not only German.
Answering your second mail:
> 2. it takes some time to get the spoken text after typing or
> navigating
> on tty
How long time? As I mentioned previously, this time will be shorten to
minimum, but it's not trivial (some constructions working in C does not
work properly in Python, especially subprocess.Popen behaves very
strange). In log file you will have lines starting from 'Preparation
time' showing time consumed for preparing each part. If this time is
same as you hear, simply be patient, it will be corrected as fast as
possible. If the real time is longer, check your audio driver.
Due to bug #866 in pulseaudio it's not possible to close connection
immediately after draining internal pulse buffers, so extra silence was
added instead. Is it the reason?
Another possible reason: you have pulseaudio installed, but in
speechd.conf you selected another driver. In this case current version
of module
will use libao with internal pulse driver, which is worst thing and you
should simply wait for next version.
> 3. a string starting with . folowed by other text produces no output
> here.
> EG.:
> . hello world
Strange - I didn't see this effect. It was bug in Latinizer (corrected
- it was spoken 'hello world' instead of 'punkt hello world').
In command line:
spd-say -o txt2pho '. hello world'
produced speech as above. Also I tried to read your mail with Orca and
Firefox - without problems.
In log file you will have input data and message logged. As you can
enable/disable logs on the fly simply changing 'enable log' parameter in
configuration, please send me fragment of log file with string producing
bad output.
Best regards
ethanak
--
http://milena.polip.com/ - Pa pa, Ivonko!