Commit Graph
89 Commits
Author SHA1 Message Date
Reece H. Dunn 00bc5f2c6c VoiceVariant.java: Use MALE and FEMALE string constants. 2013-09-04 13:42:52 +01:00
Reece H. Dunn e7921e80bf VoiceVariant.java: Replace String.split with a regex.Pattern object. 2013-08-27 16:57:17 +01:00
Reece H. Dunn d6308605de Use en-JM instead of en-029 and es-MX instead of es-419.
Android does not support UN M.49 territory codes. Instead:
  *  4.2 and earlier return an empty string;
  *  4.3 throws a MissingResourceException.
2013-07-28 18:33:24 +01:00
Reece H. Dunn bb0a8a3c7a Ensure the tests pass on Android 4.0 - 4.2. 2013-07-28 15:34:30 +01:00
Reece H. Dunn 3d2d277a10 Avoid MissingResourceException on calls to getISO3CountryCode. 2013-07-27 18:30:34 +01:00
Reece H. Dunn 3815c54cbb CheckVoiceData.java: remove a comment about not returning data that is deprecated in API 18. 2013-07-27 11:15:33 +01:00
Reece H. Dunn 6bbef4e496 GetSampleText.java: API 18 provides a constant for the 'sampleText' return value, so use it 2013-07-27 11:13:28 +01:00
Reece H. Dunn 3d0364ffce CheckVoiceData.java: don't use the deprecated EXTRA_CHECK_VOICE_DATA_FOR value
This is used to filter the list of languages returned. However, the
filtering is not needed on the engine side as the client can simply
enumerate through all the available voices instead.
2013-07-27 10:56:42 +01:00
Reece H. Dunn 7c0f855cac CheckVoiceData.java: use CHECK_VOICE_DATA_FAIL instead of CHECK_VOICE_DATA_MISSING_DATA to fix a deprecated warning using API 18. 2013-07-27 10:45:14 +01:00
Reece H. Dunn fc9bc0e55d SpeechSynthesis.java: fix getAvailableVoices() on Android 4.3 2013-07-27 10:11:16 +01:00
Reece H. Dunn 65cf6c5aa1 Revert the updating of the language when the system language changes. 2013-05-09 16:19:06 +01:00
Reece H. Dunn fe4e139a83 TtsService: fix migrating the default_gender setting. 2013-05-09 15:24:57 +01:00
Reece H. Dunn cddd48e6f6 TtsService: support changing language to the user locale when they change the system language. 2013-05-09 14:54:09 +01:00
Reece H. Dunn 7ee59ed331 SpeechSynthesis: factor out the Voice class into its own file. 2013-05-09 13:56:02 +01:00
Reece H. Dunn 774c909a9c SpeechSynthesis: factor out the VoiceVariant class into its own file. 2013-05-09 13:51:12 +01:00
Reece H. Dunn 927a46d3cc TtsService: Rename mBroadcastReceiver to make its usage clear. 2013-05-09 12:07:21 +01:00
Reece H. Dunn 5ba4971d6b TtsService: fix a 'leaked receiver' exception. 2013-05-08 16:28:58 +01:00
Reece H. Dunn 72bfb4205f eSpeakActivity: do not initiate an install of the voice data when the voice data is not installed 2013-05-08 15:11:19 +01:00
Reece H. Dunn 8bdb644285 eSpeakActivity: use the BROADCAST_LANGUAGES_UPDATED event to handle voice installation 2013-05-08 14:17:40 +01:00
Reece H. Dunn ce94bf8cdf CheckVoiceData: only list English as unavailable if the base resources are not present. 2013-05-08 13:35:59 +01:00
Reece H. Dunn 7570253b95 Do not attempt an install in CheckVoiceData.
The android.speech.tts.engine.CHECK_TTS_DATA intent should just
check that the TTS data is OK. It should not attempt a
download/install of the TTS data.
2013-05-08 12:52:23 +01:00
Reece H. Dunn 894ac4fef2 TtsService: use the same default..max value clamp for speech rate as when upgrading the settings 2013-05-06 13:52:21 +01:00
Reece H. Dunn ce8f261495 When upgrading the speech rate, clamp it to between the default and maximum values. 2013-05-06 13:43:48 +01:00
Reece H. Dunn 0867c97336 When specifying dialects of Vietnamese, specify the country code as well as the variant code. 2013-05-05 14:21:48 +01:00
Reece H. Dunn a42f748f2b Support voice variants and ages. 2013-05-05 13:25:46 +01:00
Reece H. Dunn dde42239f3 SeekBarPreference: update the persisted value when the SeekBar changes value
The idea here is that whenever the user changes one of the parameter
values via the SeekBar control, it is reflected immediately by eSpeak.
This is similar to how e.g. the brightness preference UI works.
However, instead of updating every time the value changes while the
slider is being moved, it is updated once the touch interaction is
finished.

Also, if the user Cancels or exits the dialog with the back button,
the old setting value is restored.
2013-05-05 11:09:46 +01:00
Reece H. Dunn 8d6465d6ca SeekBarPreference: ensure that the base class is called in onBindDialogView. 2013-05-04 11:28:13 +01:00
Reece H. Dunn a601d8afb1 SeekBarPreference: set the content description to the value of the parameter. 2013-05-03 18:39:31 +01:00
Reece H. Dunn 4b06b1b024 Support configuring the pitch range parameter. 2013-05-03 16:51:02 +01:00
Reece H. Dunn d0f5dc2ff4 Migrate the speech rate parameter to use the new SeekBar/Parameter UI. 2013-05-03 16:08:30 +01:00
Reece H. Dunn 16164c1c52 SeekBarPreference: fix handling of the minimum value option. 2013-05-03 16:03:27 +01:00
Reece H. Dunn b2785ce823 Remove the 'Default' gender option as this does not make sense. 2013-05-03 15:32:28 +01:00
Reece H. Dunn 09c79bb013 Make the rate setting use the new SeekBar/Parameter UI. 2013-05-03 13:07:54 +01:00
Reece H. Dunn d0ba13ae1d SeekBarPreference: support resetting to the default value. 2013-05-03 12:43:20 +01:00
Reece H. Dunn 20010daac3 SeekBarPreference: show the formatted current value in the preference dialog. 2013-05-03 12:21:30 +01:00
Reece H. Dunn 8e4b6044dc SeekBarPreference: make formatter an explicit property instead of using the extras bundle. 2013-05-03 11:54:25 +01:00
Reece H. Dunn b60ed6c9ae Display the formatted units on the volume setting. 2013-05-03 11:46:04 +01:00
Reece H. Dunn 5370341abf SeekBarPreference: only commit the preference if requested to. 2013-05-03 11:24:59 +01:00
Reece H. Dunn ac6099ebf1 Hook up the volume parameter to a slider preference dialog. 2013-05-03 11:11:59 +01:00
Reece H. Dunn 233da111db TtsService.java: rework the logic to use the new Parameter API. 2013-05-02 20:33:43 +01:00
Reece H. Dunn de78778210 SpeechSynthesis.java: further refine the Parameter API. 2013-05-02 20:13:00 +01:00
Reece H. Dunn 85836eae92 SpeechSynthesis.java: rename the parameter APIs. 2013-05-02 19:57:52 +01:00
Reece H. Dunn cc72825682 SpeechSynthesis.java: expose the different voice options from eSpeak
This makes the following changes:

1.  setVoice takes a Voice object instead of a language string.

    This is to make the API cleaner and allows SpeechSynthesis
    to pass the correct parameter (identifier for SetVoiceByName,
    or name for SetVoiceByProperties) to espeak.

2.  The espeak_SetVoiceByName API is also exposed to support passing
    the voice variant to use.

3.  The age parameter has been re-added with the constants:
    *  SpeechSynthesis.AGE_ANY
    *  SpeechSynthesis.AGE_YOUNG
    *  SpeechSynthesis.AGE_OLD
    based on the behaviour of the eSpeak voice selection algorithm.

NOTE: Due to the way that voice selection is implemented in eSpeak,
if variant is specified, the age and gender cannot be specified and
vice versa.
2013-05-02 18:06:41 +01:00
Reece H. Dunn 88eab88d8a SpeechSynthesis.java: further simplify the setVoice method.
This renames `setVoiceByProperties` to the more consise `setVoice`
and removes the name parameter as this is not used -- the voice is
set by the language and gender parameters only.
2013-05-02 16:45:46 +01:00
Reece H. Dunn 027217d5f7 SpeechSynthesis.java: Simplify the SetVoiceByProperties parameters.
The `age` parameter is not useful as eSpeak does not use this when
selecting voices. This is always set to `0` by TtsService.java.

The `variant` parameter is not used to select the actual voice
variant (from the `!v` directory) but to select the n^th matching
voice from the list of matching voices. This is always set to
select the first matching voice by TtsService.java.
2013-05-02 16:32:46 +01:00
Reece H. Dunn 23d34d702a SpeechSynthesis.java: provide a binding of the eSpeak Get/SetParameter API. 2013-05-02 16:23:59 +01:00
Reece H. Dunn 3a92ee34f2 Support the new voices. 2013-04-29 10:53:54 +01:00
Reece H. Dunn 31b2bf0c56 CheckVoiceData.java: don't check for any voices as they can change directory layout 2013-03-14 17:14:14 +00:00
Reece H. Dunn 4d44e88dd2 TtsService: support detecting SSML documents 2013-03-14 16:53:22 +00:00
Reece H. Dunn 1ac6d04c48 eSpeakActivity.java: support speaking specified text in the activity. 2013-03-14 16:30:34 +00:00