background preloader

Temp

Facebook Twitter

Java - Slowing down the playback of an audio file without changing its pitch. UtteranceProgressListener. Summary Public Constructors public UtteranceProgressListener () Public Methods public abstract void onDone ( String utteranceId) Called when an utterance has successfully completed processing.

UtteranceProgressListener

Parameters public abstract void onError ( String utteranceId) Called when an error has occurred during processing. Public abstract void onStart ( String utteranceId) TextToSpeechService. Class Overview Abstract base class for TTS engine implementations. The following methods need to be implemented. The first three deal primarily with language management, and are used to query the engine for it's support for a given language and indicate to it that requests in a given language are imminent. onSynthesizeText(SynthesisRequest, SynthesisCallback) is central to the engine implementation. The implementation should synthesize text as per the request parameters and return synthesized data via the supplied callback. This class and its helpers will then consume that data, which might mean queueing it for playback or writing it to a file or similar.

Summary Public Constructors public TextToSpeechService () TextToSpeech.EngineInfo. Class Overview Information about an installed text-to-speech engine. Summary Fields public String label Localized label for the engine. Public Constructors public TextToSpeech.EngineInfo () Public Methods public String toString () Returns a string containing a concise, human-readable description of this object. GetClass (). getName () + '@' + Integer . toHexString ( hashCode ()) See Writing a useful toString method if you intend implementing your own toString method.

Returns a printable representation of this object. TextToSpeech.Engine. Summary Constants public static final String ACTION_CHECK_TTS_DATA Activity Action: Starts the activity from the platform TextToSpeech engine to verify the proper installation and availability of the resource files on the system. Upon completion, the activity will return one of the following codes: CHECK_VOICE_DATA_PASS , CHECK_VOICE_DATA_FAIL , CHECK_VOICE_DATA_BAD_DATA , CHECK_VOICE_DATA_MISSING_DATA , or CHECK_VOICE_DATA_MISSING_VOLUME .

Moreover, the data received in the activity result will contain the following fields: EXTRA_VOICE_DATA_ROOT_DIRECTORY which indicates the path to the location of the resource files, EXTRA_VOICE_DATA_FILES which contains the list of all the resource files, and EXTRA_VOICE_DATA_FILES_INFO which contains, for each resource file, the description of the language covered by the file in the xxx-YYY format, where xxx is the 3-letter ISO language code, and YYY is the 3-letter ISO country code. TextToSpeech. Class Overview Synthesizes speech from text for immediate playback or to create a sound file.

A TextToSpeech instance can only be used to synthesize text once it has completed its initialization. Implement the TextToSpeech.OnInitListener to be notified of the completion of the initialization. When you are done using the TextToSpeech instance, call the shutdown() method to release the native resources used by the TextToSpeech engine. Summary Constants. SynthesisRequest. Speech.tts. SynthesisCallback.