Narrator: pause, acronym, numbers and character substitution

Forums: 

Hello,

a few more questions about Narrator :

1/ customizing pause duration
We would like to reduce the duration of silence after headings for instance.
We thought it was in :
\transformers\se_tpb_speechgen2\conf\sgConfig.xml
but we did not succeed to change the silence length after heading.
Is it possible to do so ? What should be changed ?

2/ acronyms
For french language, is it right to change :
\transformers\se_tpb_xmldetection\lang\fr.xml
We do add acronyms and abbreviations in that file but it does not seem to change anything at the Narrator output.
Did we miss something ?

3/ Numbers
In some XML file, we have numbers like "23 545", our TTS read it as two separate numbers. It will be read correctly if it was "23545".
What would be the right place to add an regexp expression to improve that. Is there any existing samples ?

4/ character substitution
In some XML documents produced from Word using "Save As DAISY", we have found character 0x92 (’) that is not correctly read by our TTS.
We wanted to fix that in the Pipeline by find/replace to an usual quote (0x27), we tried to modify :
\transformers\se_tpb_speechgen2\charsubst\character-translation-table.xml
but once again without success...

If anyone has suggestions / answers on these points, that will be very much appreciated,
Regards,
Guillaume du Bourguet

Hi!

About the Narrator issues:

1) Customizing pause duration
The pause duration should be possible to change. I looked at the se_tpb_speechgen2/transformer.tdf file and saw that the default value of the sgConfigFilename parameter is set to sgConfig-sv.xml (not sgConfig.xml), for some reason. Make sure you are editing the right file, once I figured that out I was able to change the durations. :)

2) Acronyms
That seems to be the right file to edit. Are any abbreviations taken care of by Narrator? The process is xml:lang dependant, are you using xml:lang="fr" in you input document? Does the file se_tpb_xmldetection/lang.xml contain a reference to your fr.xml?

3) Numbers
I don't know how your se_tpb_xmldetection/lang/fr.xml looks like, but in the end of my version there is an element called "fix". It contains a regex to find numbers containing space and give that number a w tag and a certain class attribute. To get speechgen2 to actually remove that space character before sending text to the TTS i added a rule in se_tpb_speechgen2/xslt/transform.xsl. The rule looks like this:


It simply replaces all occurrences of ' ' with '' for w elements with class="num-with-space". Copy the rule to your local transform.xsl and see if it does the job. Maybe that is a rule that should be committed to the standard transform.xml

4) Character substitution
Are you editing the right file? Is the character translation table pointed out by the french section in se_tpb_speechgen2/tts/ttsbuilder.xml? Is the syntax correct? I guess it should be something like:

The key is a code point, the entry value is a string, so there is no need to actually type 0x27 here. If you can't find a solution, you can email me the files: input dtbook document and your character translation table.

Best regards
Martin

We still have problem concerning acronym. We have verified yours remarks : The document contains xml:lang="fr-FR" in dtbook tag (changed in xml:lang="fr") We add another key with its expansion in fr.xml (DAISY Pipeline\plugins\org.daisy.pipeline_1.0.8\transformers\se_tpb_xmldetection\lang) then run => nothing … and we made another test with the fr.xml in Sonata\DAISY Translator 2.1.1.0\pipeline-lite-ms\transformers\se_tpb_xmldetection\lang => nothing ?? how do files are organized, probably files arenot in correct places !! Sincerly yours jade

I've just checked and the configuration works appropriately on my environment. You have to keep in mind that the se_tpb_xmldetection transformer only modifies the DAISY XML document (aka DTBook): it detects acronyms, initials, and abbreviations and wrap them with the appropriate element. It just improves the tagging of the textual content, it is then the responsibility of the DAISY reader to read or not read the informative expansion of the acronyms. For instance, the following paragraph in the input dtbook: <p>DAISY n'est pas une ONG.</p> will be detected and transformed into: <p><acronym pronounce="yes" title="Digital Accessible Information System">DAISY</acronym> n'est pas une <acronym pronounce="no" title="Orgnanisation non gouvernementale">ONG</acronym>.</p> Additionally, the se_tpb_speechgen2 transformer that generates the audio files using a TTS voice can be configured to speak the title expansion instead of the acronym, which may be what you want. To achieve this you can apply an XLST transformation to the structures sent to the TTS. You'll have to add these lines to the file "se_tpb_speechgen2/xslt/transform.xsl" <xsl:template match="acronym[@pronounce='yes']"> <xsl:value-of select="@title"/> </xsl:template> Here are a few documentation pointers: Hope this helps, Romain.

Thanks For the abbreviations we have followed a similar procedure. We insert followed lines in transform.xsl file : <xsl:template match="abbr">      <xsl:value-of select="@title"/> </xsl:template> Do you know similar procedure for the initialism, if it is nescessary. Note. If pipeline is running, any change in transform.xsl file are inoperant. they become it after end of pipeline. jade

> Do you know similar procedure for the initialism, if it is nescessary. Such expansion is definitely not necessary, it is your call whether you want the expansion to be pronounced rather than the initialism. > If pipeline is running, any change in transform.xsl file are inoperant. they become it after end of pipeline. jade Right: the XSLT stylesheet is compiled when it is used for the first time, for better performance, which also means you need to restart the Pipeline after each manual modification. Romain.

I would like to reduce the duration of silence too. The related configuration can be found in both files: 1. C:\Programme\DAISY Pipeline\plugins\org.daisy.pipeline_1.0.8\transformers\se_tpb_speechgen2\transformer.tdf 2. C:\Programme\DAISY Pipeline\plugins\org.daisy.pipeline_1.0.8\transformers\se_tpb_speechgen2\conf\sgConfig.xml In transformer.tdf there is confiruration as following: <parameter required="false" direction="in" type="text/plain"/> <name>endSilencePadding</name> <description>Add milliseconds of silence padding at the end of each audio file. This silence is not pointed out by smil.</description> <example>1000</example> <default>500</default> </parameter> In sgConfig.xml there is confiruration as following: <silence> <afterLast>2000</afterLast> <afterFirst>800</afterFirst> <beforeAnnouncement>300</beforeAnnouncement> <afterAnnouncement>300</afterAnnouncement> <afterRegularPhrase>200</afterRegularPhrase> </silence> I have tried the changed the value of silence in both Files. There is no effect. Anyone has any suggestion?

Hello!
I am trying to work around these same issues on the newest version. I have solved the thing with the acronyms, but I still can get no change in the silence. I can't make it shorter OR longer... any new ideas regarding how to solve this??

Also, do you know if there are any translation projects going on for Narrator???

Thank you!!

I've just checked and editing the sgConfig.xml file works fine to change the silence duration. Could you please give us more details on what is not working ?

As for translations, it is done on a volunteering basis. Let us know if you're willing to contribute!

BR,
Romain.