public class RandomNumberVoiceProducer extends Object implements VoiceProducer
VoiceProducer which generates a vocalization for a given number,
randomly selecting from a list of voices. The default voices are located in
the jar in the sounds/en/numbers directory, and have filenames
with a format of num-voice.wav, e.g.:
sounds/en/numbers/1-alex.wav.
| 构造器和说明 |
|---|
RandomNumberVoiceProducer() |
RandomNumberVoiceProducer(Map<Integer,String[]> voices)
Creates a
RandomNumberVoiceProducer for the given
voices, a map of numbers to their corresponding filenames. |
public RandomNumberVoiceProducer()
public RandomNumberVoiceProducer(Map<Integer,String[]> voices)
RandomNumberVoiceProducer for the given
voices, a map of numbers to their corresponding filenames.
Conceptually the map must look like the following:
{1 => ["/my_sounds/1-quiet.wav", "/my_sounds/1-loud.wav"],
2 => ["/my_sounds/2-quiet.wav", "/my_sounds/2-loud.wav"]}
voices - public final Sample getVocalization(char num)
getVocalization 在接口中 VoiceProducerCopyright © 2015. All rights reserved.