| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Ever wished to be able to change prosodic parameters in Festival easily and in a uniform way for different voices? Well, here are the appropriate functions. They are no way guaranteed to work for all voices, since each voice can have its own unique way of prosody handling. But they should work for typical cases.
set-pitch value
Set mean pitch of the voice to value and return the old pitch value. value is given in Hertz.
set-pitch-range value
Set the pitch range of the voice to value and return the old pitch range value. The value is in percents of the mean pitch, its clear meaning is not defined.
set-volume value
Set volume to the given value and return the old volume value. value must be in the range 0–1 from silence to maximum (the default).
set-rate value
Set voice rate to value and return the old rate value. value is in the range 0.1–10 from the slowest to the fastest. The value 1 corresponds to the normal voice speed, other values multiply the voice speed appropriately.
The value argument of all the functions above may also be a function of a single argument accepting the current parameter value and returning its new value. The following convenience functions return functions which adjust the parameter values appropriately:
prosody-shifted-value shift
Return a function modifying the value by adding shift to it.
prosody-relative-value coef
Return a function modifying the value by multiplying it by coef.
Example setting doubling the current voice speed:
(set-rate (prosody-relative-value 2)) |
When you switch to a different voice, prosody parameters get lost. festival-freebsoft-utils offers a way to restore them, using the following functions:
change-prosody function value
Similar to the set-* functions described above, except it
additionally saves the set prosodic value. function is one of
the set-* functions and value is its parameter value.
restore-prosody
Set prosodic parameters according to their current saved values.
reset-prosody
Reset the list of the saved prosodic values. Note, it just deletes the saved settings and doesn't actually change the current prosodic parameters.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] |
This document was generated by Milan Zamazal on August, 11 2009 using texi2html 1.78.