Synthesis of Russian speech in Linux

    I read an article about SAPI and Powershell (We teach PowerShell to talk ), and I was wondering how about the synthesis of Russian-language speech in my native OS, Linux. As it turned out, everything is far from being so rosy, and the quality of the synthesis is far from the voice of Alena, but still.

    For the synthesis of speech in linux, Festival traditionally uses the latest stable version 1.95, but the delivery does not have a Russian voice, after a little searching I came across a project on the synthesis of Russian speech through Festival, where it says that to work with the Russian language you will need at least version 1.96 beta. Well, nothing in Ubuntu 9.04 is just that. Then there are two options, either to build the package yourself, or to install a separate package for Debian or Ubuntu users, this miracle weighs ~ 190 meters, it’s not sickly, as I would say. Since Ubuntu decided to install the package for me.
    The package is called Festvox-ru , and will be available in ubuntu starting from version 9.10, since 9.04 is on hand, then download the package and install it manually. And then a small problem was revealed.
    When he tried to ask the festival to say something in Russian, he simply was silent, but if the language was indicated
    echo "Проверка" | festival --tts --language russian, he fell out with the error:
    “Unsupported language, using English”
    SIOD ERROR: unbound variable: voice_rab_diphone
    festival: fatal error exiting.

    Dams, let's try to do it as in the manual, run the festival interactively, specify the voice forcibly (voice_msu_ru_nsh_clunits) and ask to say something (SayText “Check”), voila everything works fine, format it as a bash script and get it Now we save this is in the sayit.sh file, assign the rights to run chmod a + x sayit.sh and check ./sayit.sh "Check" Hurray! everything works. If we want to read the file, we use: But still, why didn’t the Russian language work by default, we dig further. A little googling and we find a bug report to the debian from Sergey Kirpichev, this bug report

    #!/bin/sh
    festival -b "(begin (voice_msu_ru_nsh_clunits) (SayText \"$1\" nil))"







    #!/bin/sh
    festival -b "(begin (voice_msu_ru_nsh_clunits) (tts_file \"$1\" nil))"



    . It looks like we need to fix the languages.scm / file.
    So we go to the / usr / share / festival directory where we find this file and make changes.
    We add first: and in define (select_language language). add a couple of lines. Now everything is supported in Russian. We are trying to read the file. festival --language russian -tts festival.txt Well, everything isn’t even so bad, the only “but” is that Festival thinks quite clearly before it starts to speak, and sometimes it doesn’t like the text, for example instead of skipping what he cannot pronounce he falls out with a message about LTS_Ruleset russian_downcase: no rule matches: LTS_Ruleset: # * here * Well, what does it mean to kill the link text.

    (define (language_russian)
    "(language_russian)
    Set up language parameters for Russian."
    (set! male1 voice_msu_ru_nsh_clunits)
    (male1)
    (Parameter.set 'Language 'russian)
    )



    ((equal? language 'russian)
    (language_russian))







    So far, the result is not particularly pleasing to me, in principle, the synthesis of Russian speech under Linux is possible on the one hand, and on the other, the quality of this synthesis leaves much to be desired. And I got two new shell scripts. sayit.sh and readit.sh ^ _ ^
    Examples of scoring can be found in the article
    Learn iPod Shuffle G3 to speak Russian

    Used sources:

    The art of programming in the shell script language
    Russian at Festival
    A new base for speech synthesis and voice for festival
    Debian Bug report logs - # 516262 festival: Please add support for --language russian
    P.S. on the advice of rengel_system , instead of installing the package with handles, it’s
    better to connect this P.PS repository on the advice of eugenex15 decided to try espeak. it is installed very simply, the Russian language is right out of the box, to save a voice sample you can only add one parameter, but here the quality seemed to me just terrible. Perhaps you can build a pronunciation to get a less or less civilian result, but I didn’t succeed.
    PPPSI posted two examples of the synthesized phrase with default parameters in espeak and in the festival
    espeak
    festival
    (if anyone can suggest another place where it would be more convenient to put wavs I will use it with pleasure)
    UPD: Reply from the habrazer vk2 Alena’s voice

    Also popular now: