Opened 8 years ago

Last modified 8 months ago

#997 new enhancement/feature request

use new version of espeak for wince port

Reported by: martin tlustos Owned by:
Priority: minor Milestone: version 0.6.0
Component: port/wince Version: git master
Severity: complex Keywords:
Cc:

Description

The version used currently in Navit is 1.41 whereas espeak now has Version 1.46. On my windows ce device 1.41 has some problems that could be solved by using 1.46 (German special characters pronounciation).

Change History (14)

comment:1 Changed 7 years ago by martin tlustos

I'd appreciate it. Hearing that "s-z-e" instead of the "ß" is pretty annoying because you hear it all the time (it's in the German word for "street")

Other options: fix the espeak language definition files (tried it, but I have another version of espeak on my system, so it refused to open it), use mbrola (probably not possible, right?) or use .wav files...

comment:2 Changed 7 years ago by sleske

I'm afraid the WinCE port is not getting much attention ATM. From the SVN logs it looks like the last significant development was at the end of 2010. But maybe someone will step up to fix it...

I don't have a WinCE device, so I can't fix this, but if you supply a patch, and others test it, I can probably apply it. Just attach it to this bug report.

comment:3 Changed 7 years ago by tryagain

Usage of outdated espeak on wince is caused by two facts:

  • espeak doesnt natively support that platform (at least it did not support around 2010) so we cant link to any official version of it.
  • cp15 said he doesn't like the idea to link to current espeak version without massive code changes, because espeak uses c++ specific but is not object oriented. So it makes navit to link against c++ runtime library on that platform which hardly affects memory requirements. Current version of espeak included in support is converted by cp15 from c++ to pure c.

Though I'm unsure if memory requirements indeed grow that much when we just use such things like passing function parameters by reference.

comment:4 Changed 7 years ago by sleske

Thanks. So it's a bit more work than just downloading the latest espeak.

I had a look at the SVN logs, and it looks like cp15 first commited the original espeak version, and then his changes. So we have all the changes that were necessary, and could try to re-do them. While there are many changes, most look reasonably simple, so maybe this is doable. See SVN logs , rev. 2606-2610.

I'm afraid I can't help more, as I don't have a WinCE device, but maybe this helps if someone else wants to step up.

comment:5 Changed 7 years ago by martin tlustos

As an alternative, would it be possible to add a feature to the wince port to be able to play wav or mp3 files? Maybe through a library call (I'm not a programmer, but when I looked into finding an external program you could call, I got to a web page that described the library call function)?

comment:6 Changed 7 years ago by martin tlustos

I communicated with the espeak guys about my problem and they gave the following hint:

the windows ce device has us locale only enabled

Yes, this is probably the cause. If 'ß' is not recognized as an alphabetic character then eSpeak will split the word "straße" into 3 words, "stra ß e". It will speak the 'ß' character as its letter-name.

The same problem will occur will other non-ascii letters such as unlaut vowels, so "demnächst" will be spoken as ""demn ä chst" and since the word "chst" does not contain a vowel the 4 consonants will be spoken as their letter-names.

This can be fixed by adding this line to the program source code file speech.h and then recompiling eSpeak:

#define NEED_WCHAR_FUNCTIONS

eSpeak will include and use its own data for non-ascii characters. It's not complete, but is sufficient for most Latin character alphabets such as German.

So for a absolute non-techie like me this sounds simple - but I don't really know how easy it would be to implement... ;-)

comment:7 Changed 7 years ago by tryagain

Hi.

Bad news, it doesnt compile as easy as I would expect with that option enabled, just complains on a bunch of wchar functions being redefined. I don't think this option will help even if we trick to compile with it enabled.

Good news, we actually have language="xxx" attribute for speech of type="espeak". I have added a short note on it here http://wiki.navit-project.org/index.php/Configuring_Navit/Full_list_of_options#Full_options

I was unable to test it for now, so if you'll have some success, please fix the language attribute sample on the wiki.

So, tryagain

comment:8 Changed 7 years ago by martin tlustos

I tried the language="de" option, but it doesn't help. It would have surprised me, though... If I understand right, then how characters are treated relays on the language support of the device. So, if my device has no support for German characters, then there are only a couple of possible solutions:

1) turn on the "need_wchar_functions" - but this probably would limit navits support of other languages as it limits navit to its built in non-ascii characters. 2) define a conditional setting for wchar functions to only use them if native language support is missing. This one seems to me like a lot of work, though (I'm not a programmer, it just sounds nasty) 3) turn of espeak on such devices (or just let it beep). 4) switch to playing wav or mp3 files - also a lot of work. 5) somehow put additional language support into that wince device - but I don't know whether this is even doable.

Anyway I doubt that it is worth the effort for the navit team to dig more into this as it only affects wince devices with us only language support - I don't know how many of this type are there.

comment:9 Changed 6 years ago by usul

Call me wrong, but as eSpeak supports a markup language, why don't we pass an enriched string to espeak? http://espeak.sourceforge.net/ssml.html

This would IMHO allow even a mix between multilanguaged texts for example: "<en>Please turn into</en> <de>Müllerstraße</de> which would be very useful if you drive in different countries?

comment:10 Changed 6 years ago by usul

Ok, so this works fine for my espeak 1.46.02 at Ubuntu:

<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2001/10/synthesis http://www.w3.org/TR/speech-synthesis/synthesis.xsd" xml:lang="en-US">
        <s xml:lang="en-US">You are driving along the Müllerstraße</s>
        <s xml:lang="en-US">You are driving along the <s xml:lang="de-DE">Müllerstraße</s>.
</speak>
espeak -m -f test.ssml

As I read, even it's tricky to build a newer espeak, it should be still possible

comment:11 Changed 6 years ago by usul

  • Milestone changed from To be discussed - Give your opinion! to version 0.5.1

comment:12 Changed 6 years ago by usul

  • Severity set to complex

comment:13 Changed 2 years ago by http://wiki.navit-project.org/index.php/user:jkoan

  • Milestone changed from version 0.5.1 to version 0.5.2

This ticket was pushed back in order to bring 0.5.1 out soon.

comment:14 Changed 8 months ago by http://wiki.navit-project.org/index.php/user:jkoan

  • Milestone changed from version 0.5.2 to version 0.6.0

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.