Saving and loading voice preferences

The voice preferences are the set of synthesis and FX parameters that allows to customize voices. If you want to keep a set of synthesis and FX parameters, you can save it in a ".xml" preference file in the "/home/nao/naoqi/preferences" folder and load it with the loadVoicePreference method.

The preference file must be formatted as described below:

<ModulePreference schemaLocation="ModulePreference.xsd" name="aldebaran-robotics.com@ALTextToSpeech_Voice_defaultEnglish"> <Preference value="Kenny22Enhanced" type="string" name="sourceVoice" description="Synthesis source voice"/> <Preference value="0.0" type="float" name="doubleVoice" description="Ratio of pitch shifting applied to the doubling voice"/> <Preference value="0.0" type="float" name="doubleVoiceLevel" description="Level of the doubling voice"/> <Preference value="0.0" type="float" name="pitchShift" description="Ratio of the pitch shifting applied to the main voice"/> <Preference value="0.125" type="float" name="doubleVoiceTimeShift" description="Delay (ms) between the double voice and the main voice"/> </ModulePreference>

The name of the ".xml" file must begin by "ALTextToSpeech_Voice_" and finish by the name of the voice you want to load with the loadVoicePreference method.

For example, the following piece of code loads the set of voices parameters contained in the "ALTextToSpeech_Voice_NaoOfficialVoiceEnglish.xml" file of the preference folder.

tts.loadVoicePreference("NaoOfficialVoiceEnglish")





Copyright © 2010 Aldebaran-Robotics - All rights reserved