public class NumberVoiceProducer extends Object implements VoiceProducer
sounds/en/numbers directory,
and have filenames with a format of num-voice.wav, e.g.:
sounds/en/numbers/1-alex.wav.| Constructor and Description |
|---|
NumberVoiceProducer()
Creates a
NumberVoiceProducer for the default set of voices. |
NumberVoiceProducer(Map<Integer,String[]> voices)
Creates a
NumberVoiceProducer for the given voices. |
| Modifier and Type | Method and Description |
|---|---|
Sample |
getVocalization(char num)
Returns the audio sample for the given single character.
|
public NumberVoiceProducer()
NumberVoiceProducer for the default set of voices.public NumberVoiceProducer(Map<Integer,String[]> voices)
NumberVoiceProducer for the given voices.
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 - a map of numbers to their corresponding filenames.public final Sample getVocalization(char num)
VoiceProducergetVocalization in interface VoiceProducernum - single character.Copyright © 2015. All rights reserved.