speech.speak("Text to Speech voice was not changed, as there are no alternative voices.");
}
return;
}
SpeechVoice firstVoice = voices.next();
SpeechVoice currentVoice = firstVoice;
SpeechVoice newVoice = firstVoice;
// Loop through, find the current voice (if found) and set to next voice.
// If the current voice couldn't be found, set it to the first one we find.
SpeechVoice v = speech.getCurrentVoice();
if (v != null) {
boolean found = false;
while (voices.hasNext() && !found) {
if (v.getName().equals(currentVoice.getName())) {
if (voices.hasNext())
newVoice = voices.next();
found = true;
}
if (voices.hasNext())