Error: DTBook to DAISY 3 with TTS

Forums: 

Hello,

I hope someone can help me with this.

When testing DTBook to DAISY 3 script with Text-To-Speech enabled, the job fails with the error “No audio encoder found.” In detailed execution log, the relevant line is

2014-09-09 15:53:35,629 [ERROR] com.xmlcalabash.runtime.XPipeline - No audio encoder found.

After going through the source code on github, I found that the error is raised from class pipeline-mod-tts / ssml-to-audio / src / main / java / org / daisy / pipeline / tts / synthesize / SynthesizeProvider.java
lines 29 – 34:

// TODO: select an AudioService according to the user's preferences
encoder = mAudioServices.getEncoder();
if (encoder == null) {
runtime.error(new RuntimeException("No audio encoder found."));
error = true;
}

Is there a way to work around this issue, manual setup or something?

Thank you very much in advance!

Jukka
Celia

Hello,

Do you have the Lame encoder installed on your system?
In addition to a Text-To-Speech processor, the TTS step requires an encoder to produce MP3 files. For now, the pipeline can only communicate with the Lame encoder (http://lame.sourceforge.net/), which is available on Windows, Linux and MacOSX.

On Unix platforms, it should work out of the box if Lame has been installed via an apt command or any equivalent. On Windows, it must be appended to the PATH manually. Otherwise, the link to Lame's binary can be set thanks to the system property "lame.path" in /daisy-pipeline/etc/system.properties.

It can also happen that the Lame component is not yet ready, or that something went wrong with its registration. In that case, it should be sufficient to kill and restart the server.

It can also be the case that the Lame component is not yet ready, or that something went wrong with its registration. If so, it should be sufficient to kill and restart the server.

Hello,

Thank you for your quick reply!

I'm running Windows. I had Lame installed; appending it to PATH fixed this problem.

However, now I am getting the following error:

Could not find any installed voice matching {vendor:%unknown%, name:%unkown%} or providing the language 'fi'
The corresponding part of the text won't be synthesized.

I tracked the error down to pipeline-mod-tts / ssml-to-audio / src / main / java / org / daisy / pipeline / tts / synthesize / SynthesisWorkerPool.java
lines 116 - 120:

Voice voice = mTTSRegistry.findAvailableVoice(voiceVendor, voiceName, lang);
if (voice == null) {
mLogger.printInfo("Could not find any installed voice matching "
+ new Voice(voiceVendor, voiceName) + " or providing the language '"
+ lang + "'");

Apparently either a) there's a problem with voiceVendor or voiceName in the SSML or b) for some reason the module does not recognize the Finnish TTS voices installed on the system.

I do not get error "Registry of TTS engines is missing.", which would be raised if mTTSRegistry were not set at all.

Currently I have eSpeak Finnish voices, MS Anna (English) and ScanSoft Mikko (Finnish) installed. According to the release notes for version 1.8, at least eSpeak should work, am I right?

I have tried changing my system's default TTS voice to each of the above, but this does not help.

Do you have ideas what to try next?

Thank you for your help!

Jukka
Celia

Hi,

You're right, eSpeak should work. There might be two reasons why it doesn't:

1. The pipeline can't find the eSpeak binary. Like Lame, eSpeak must be appended to the PATH. Alternatively, the system property "espeak.path" can be set. Either way, you should see in daisy-pipeline.log something like "Will use eSpeak binary: C:\foo\bar\espeak". If you don't see it, there is probably an error instead. For example:

"espeak-bin could not be initialized" and a lot of Java stuff after, from which we could further investigate.

2. eSpeak for Windows doesn't include any Finnish voice. You can list the available voices with the command "espeak --voices" or open daisy-pipeline.log to see if there is the line:
* {vendor:espeak, name:finnish} by espeak-command-line

As for Windows-enabled voices, perhaps Anna is recognized but it won't be used anyway since it's an English voice. Unless you configure an Aural CSS stylesheet as follows:
book {
voice-family: Microsoft, Anna;
}
and provide the absolute URI of the stylesheet as an option of the command line client.

ScanSoft Mikko, on the other hand, cannot be recognized without some configuration work. You have to add the following line to the system.properties file:
priority.Scansoft.Mikko.fi = 100
If Windows is not able to figure out which vendor the voice belongs to, it will fail. In that case, you may try:
priority.Microsoft.Mikko.fi = 100

I hope this will solve the problem.

Hello,

And thanks again very much for your help.

The problem was #1; appending eSpeak to PATH fixed it.

However, I did not yet manage to get ScanSoft working. I will look into this and hopefully get it working.

Jukka
Celia

Hello again,

I have been trying to get ScanSoft Mikko working. I tried adding the lines mentioned above (priority.Scansoft.Mikko.fi = 100 and priority.Microsoft.Mikko.fi = 100) to system.properties. This did not help, DP2 will always only use eSpeak voice.

Furthermore, I tried Bitlips voices in a similar manner. I also tried forcing eSpeak's priority to zero, to no avail.

Am I missing something? Any ideas what to try next?

Thanks again in advance!

Jukka
Celia

Hello,

The system property must be consistent with the information provided by Microsoft SAPI. Sadly, the SAPI's way of naming voices is not very predictable. My wild guess is "priority.Scansoft.Scansoft_Mikko.fi = 100" or "priority.ScanSoft.ScanSoft_Mikko.fi = 100" with the capital letters.
If it is not working, you can find the actual name by searching for "Available voices" in the Pipeline's log. Below that, you should find a line similar to this one:

* {vendor:'Scansoft', name:'Scansoft Mikko'} by sapi-native

The white space in "Scansoft Mikko" must be replaced with an underscore in the system properties, as follows: "Scansoft_Mikko".

If there is no such line in the logs, it is probably because something went wrong with SAPI. Here again, you can find more information in the logs. Look for the line "sapi-native could not be initialized". Note that SAPI requires the installation of Visual C++ Redistributable Package (http://www.microsoft.com/en-us/download/details.aspx?id=30679).

Feel free to send me your logs so I can have a look: romain.mouret@braillenet.org

On recent Windows, the log file should be located here:
C:\Users\%your_username%\AppData\Roaming\DAISY Pipeline 2\log\daisy-pipeline.log

Which version of Windows are you running?

I tried lines "priority.Scansoft.Scansoft_Mikko.fi = 100", as well as capitalized as "ScanSoft". Furthermore, I tried "Scansoft_Mikko_Full_22kHz.fi" with different capitalizations - this is the name displayed in SAPI5 TTSAPP. However, none of these worked.

I checked the log files. There was no occurence of 'Scansoft Mikki' there, and as you guessed, there was the line "sapi-native could not be initialized".

I have installed Visual C++ Redistributable Package with no problems. For example, SAPI5 TTSAPP works correctly and I can use all the voices I have installed. I am running Windows 7 Professional 64 bit.

I have sent you the log file in email.

Thanks for the log.

It seems like some dependencies are missing. The Pipeline requires a few system DLL libraries. Usually they are already on the machine, so we didn't bother to mention them. but it can happen that they are not properly installed for some reason. Here are the required DLLs:

ole32.dll
shlwapi.dll
kernel32.dll
msvcp110.dll
msvcr110.dll

msvcp110.dll and msvcr110.dll should be installed by the VC++ packages, but it's worth checking. On your 64-bit Windows, they must be located in C:\Windows\System32.

The other DLLs are very common. Make sure you have them along with their own dependencies. In case you want to check more than their presence on your system, but also to check that they actually provide what we expect from them, I'll send you by email what you need to perform such a verification.

Recently I've tested some custom voices. For some of them, there is still a chance that the SAPI connector doesn't work even after installing all the dependencies. This is because some voices do not provide all of the features that we need for synchronizing the text with the audio. Microsoft's voices do provide these features of course, but I don't know about Scansoft. Part of this problem will be resolved in the forthcoming release, though for the current version of the Pipeline, I'm afraid there is nothing we can do.

Hi,

I had the same problem as the topic starter. I also added the Lame encoder to the PATH. When this didn't fix it, I added it to the properties file.
Now I am facing with this error:

2014-11-24 18:00:00,274 [ERROR] com.xmlcalabash.runtime.XPipeline - Misconfigured. No 'class' in configuration for px:synthesize

Is this still related to the Lame encoder or what am I missing in my setup? I am trying to run the Daisy Pipeline 2 on Windows 8 64 bit and convert a DTBook to a Daisy 3.

Thanks in advance!

Hi Reynouts,

No, this is not related to Lame.
This bug happens sometimes. The only thing you can do is stop the server and try again. On Windows, it is safe to kill the server's Java process via the Task Manager.

Which text-to-speech processor do you intend to use? eSpeak or the built-in Windows engine?

Hi Romain,

Thanks, unfortunately my error for the "No audio encoder found" reappeared after kill the processes and restart.
As said, I installed the lame encoder and added it to the PATH variable, but I think I missed something.
I will try it on another machine, maybe Windows 8 is doing something bad..

I would like to use a text-to-speech processor which is not directly supported (yet) by the pipeline: CereVoice by Cereproc.

I want to experiment with the Daisy Pipeline 2.
We (Dedicon) have a custom pipeline which relies on Daisy Pipeline 1 for a little bit (custom script which runs the narrator), but I would like to research the possibilities to replace it with (a part of) this new pipeline 2.

Regards,
Reinout

Hi,

Can you send me your logs? My address: romain.mouret (at) braillenet.org
You should find them here %AppData%\Roaming\DAISY Pipeline 2\log\daisy-pipeline.log although I don't have any Windows8 at the moment to check the exact path.

If there is something wrong with Lame on your system, I'll see it in the logs.

I'm also interested in seeing your %PATH% variable, if you don't mind copy/pasting it here.

Thanks.