WM Android Comando de Voz
Usa arquivo Java tipo .Jar como biblioteca de execução
// Initializes the speech synthesis
import com.PC SOFT.synthesis.*;
import android.util.Log;
public static void InitializeSpeechSynthesis(){
SpeechSynthesisManager.gSpeechSynthesis.Init(getCurrentActivity());
}
--------------------------------------------------------------------------------------------------------------------------------------
// Reads a text via the speech synthesis if it is initialized
import com.PC SOFT.synthesis.*;
public static boolean ReadText(String sText){
if(SpeechSynthesisManager.gSpeechSynthesis.bInitDone){
SpeechSynthesisManager.gSpeechSynthesis.ReadText(sText);
return true;
}
else{
return false;
}
}
----------------------------------------------------------------------------------------------------------------
// Stops the speech synthesis
import com.PC SOFT.synthesis.*;
public static void StopSpeechSynthesis(){
SpeechSynthesisManager.gSpeechSynthesis.Stop();
}
-----------------------------------------------------------------------------------------------------------------
Usando o .jar
// Summary: Starts the speech synthesis
//
PROCEDURE ReadingJAR()
// Read the text
IF ReadText(EDT_Text) = False THEN
Info("The text was not read because the speech synthesis was not initialized or installed.")
END