104 Commits

Author SHA1 Message Date
Charles Chen
1a2712ce2a Fix for bug 2564771 - pitch setting between apps can
interfere with one another.

Root cause was not caching all the params that were needed.
This change fixes that bug as well as related bugs for remembering
the default engine and for making sure that the right engine is
loaded when checking for language availability.

Change-Id: I2a76da8faec8112036e68d27539db444c53a1509
2010-04-01 17:39:15 -07:00
Charles Chen
42229259a6 Fix for bug 2548048 - it was impossible for applications to discover
if their TTS settings were being overridden by the user or not.

Change-Id: I28856a1b79c9455435671d13ed614a1ccb4e95ea
2010-03-29 18:35:30 -07:00
Charles Chen
def7185cf1 Cherry-picking this fix into Froyo.
This fix is part of addressing bug #2548048

Making it possible to determine which TTS engine is currently set
as the default by the user.

Change-Id: Ifa422f43a33498b94d96811078c0794d64668357
2010-03-26 16:14:10 -07:00
Jean-Michel Trivi
54a3dcdbef Fix bug where the setConfig method in SynthProxy has the wrong
signature.

Change-Id: If04b9a1d6de6384d7f53efac4e60f1cd4d659625
2010-03-18 14:50:06 -07:00
Jean-Michel Trivi
900e0d0954 Update TTS plugin interface to receive engine configuration data
coming from the plugin helper code (handling config and preferences).

Change-Id: Ibc1d229463f11f8977552d74d1fd2aa6a6cab88e
2010-03-18 11:52:41 -07:00
Charles Chen
726a40bc50 Enabling plugin engines to pass in their engine specific settings
via a ContentProvider to the TtsService so that the TtsService can
invoke their .so file with those settings.

Change-Id: Icd0e966971c36ebb4da191a50cda96d6f4525df5
2010-03-17 23:47:07 -07:00
Jean-Michel Trivi
76dd788a6e Support plugin parameter updates for TTS plugin settings.
Change-Id: Ia18a15b260a5eccb9ac55a8d526832c015224bca
2010-03-17 22:08:26 -07:00
Charles Chen
dd5b4e2150 Added a check to TtsService to make sure that the engine is enabled
before using it; if the engine is not enabled, TtsService will fall
back to using the default system engine.

Change-Id: I401f9c19cc1351c0ae6daf2b11069e5036febc51
2010-03-17 19:15:41 -07:00
Jean-Michel Trivi
1105f0f273 Revert TTS output filter tuning after reverting the Pico 1.1.0.2
energy distribution change in an attempt to fix bug 2449814.

Change-Id: I144649f599e066e7ec85c05f6b2a5fdda64ec7b5
2010-03-15 15:37:51 -07:00
Jean-Michel Trivi
f4743a869d Merge "Fix bug 2481825 When TTS is synthesizing to a file, return an error if the file cannot be created." 2010-03-09 10:31:30 -08:00
Jean-Michel Trivi
b21651c10c Fix bug 2481825
When TTS is synthesizing to a file, return an error if the file
cannot be created.
2010-03-08 16:45:00 -08:00
Jean-Michel Trivi
c6120193ef Fix typo in log message in TTS SynthProxy.
Change-Id: Ica7dbf6cb3db2e07958fadad476571b91bde2c24
2010-03-07 14:29:58 -08:00
Jean-Michel Trivi
796325b619 Fix bug 2449814
Reduced the amount of filtering and amplification at the output
 of the Pico TTS engine v1.1.0.2

Change-Id: I89f577b5e94e171b4ed892faffb863f19428cc1a
2010-03-07 14:02:31 -08:00
Kenny Root
1ead4f0f70 Expand buffer in SynthProxy to hold int
32-bit signed integers are 11 bytes and a byte at the end for \0

Change-Id: I6a9cf69ecc64614c610cbade1c3398506d6f62f5
2010-03-04 11:06:59 -08:00
Ying Wang
c882ddacc8 Fix Proguard flags. 2010-03-02 09:36:33 -08:00
Charles Chen
6a8b73be57 Fixing a bug with TTS that caused TTS to ignore the default settings
unless the user had set the defaults to always override app settings.
2010-03-01 18:52:41 -08:00
Jean-Michel Trivi
e3c1890a4c Fix bug 2452941 Add a flag to maintain the intended direct playback
of TTS data independently from the associated AudioTrack state.
 Only start the track when it's been stopped but is supposed to be
 playing.
2010-02-24 18:52:39 -08:00
Charles Chen
9b7cb792d0 Setting the synth busy flag inside a synchronized block for
thread safety.
2010-02-10 19:46:48 -08:00
Charles Chen
44afb7be73 Fixing a race condition in the TextToSpeech service that could be
triggered if many long utterances are started and interrupted in
rapid succession.
2010-02-08 14:11:45 -08:00
Charles Chen
f5c87b386c Fixing a bug with the TextToSpeech speech queue processing.
The queue processor should not be called for the next item
until synthesis has actually happened for the current item;
before it was being incorrectly called regardless of
whether or not the synthesizer had processed the current item.
2010-02-05 17:13:59 -08:00
Jean-Michel Trivi
0320f8bdfb Apply EQ on the output of the speech synthesis only when using the Pico
TTS engine.
2010-01-11 14:16:28 -08:00
Charles Chen
714834d757 Merge "Enabling multiple apps to use different speech synthesis engines and not interfere with one another." 2010-01-08 15:26:57 -08:00
Charles Chen
60dd360640 Enabling multiple apps to use different speech synthesis engines and not
interfere with one another.
2010-01-08 15:06:57 -08:00
Jean-Michel Trivi
ddc63ad04b Remove useless start of AudioTrack for TTS and improper volume setting.
The AudioTrack that plays the synthesized audio data should only be
started when the first synthesis request is sent, not after the
initialization of the engine.
The track volume should be initialized to it nominal level. Volumes
above 1 do not provide amplification, so setting the volume to 2 is
not necessary.
2010-01-08 15:03:50 -08:00
Joe Onorato
f5d95cbc1a less log spew 2010-01-08 15:46:24 -05:00
Jean-Baptiste Queru
432bff01ec Do not use a user tag on apps, as it is ignored.
The build system does not honor user tags on apps,
and setting it is misleading.

This removes the confusion by making the makefiles
behave like they read.

Change-Id: I7c5feba1c7d07f915b97dd098584f29938a4c885
2010-01-06 08:53:44 -08:00
Charles Chen
f524115e10 am 014085a8: am 4bc95d19: Merge change Iab089078 into eclair-mr2
Merge commit '014085a8727d7e10a4d39cba4a6d27826b66bc00'

* commit '014085a8727d7e10a4d39cba4a6d27826b66bc00':
  Fix for a race condition that can occur if an utterance
2009-12-29 20:11:10 -08:00
Charles Chen
ab089078b1 Fix for a race condition that can occur if an utterance
is stopped right when it completes.
2009-12-11 13:54:11 -08:00
Charles Chen
b4fbe768f8 Adding the ability to specify the speech synthesis
engine to use for text-to-speech.
2009-11-19 12:02:55 -08:00
Charles Chen
998207c821 Adding support for plugins. 2009-10-20 11:11:22 -07:00
Mike Cleron
2d4deb11e1 Placeholder mdpi assets 2009-09-30 10:58:37 -07:00
Mike Cleron
a408791148 Newer icons 2009-09-30 01:04:36 -07:00
Mike Cleron
ee9b30d394 New icons 2009-09-29 13:01:09 -07:00
Jean-Michel Trivi
3218471bcd Modify the gain after filtering to prevent TTS clipping in en-US. 2009-09-01 13:46:43 -07:00
Jean-Michel Trivi
b009418048 Clean TTS logs: use a common TAG in the TTS service, don't show
an error when loading the native synth lib.
2009-08-31 14:46:18 -07:00
Jean-Michel Trivi
09f8db7ad3 Add a synchronous stop method to TTS synth engine so that upon its destruction,
if it was synthesing to a file, the latter can be deleted without
still being written to.
Clear the hashmap of SpeechItem to be stopped (mKillList) when the speech
queue is empty.
2009-08-31 11:39:20 -07:00
Jean-Michel Trivi
ab6ed2c2b9 Launch synthesis thread at max priority to prevent hicups in playback.
Return and log an error when an operation cannot be completed because
the speech queue is locked longer than the timeout period.
Log cleanup.
2009-08-28 09:25:11 -07:00
Jean-Michel Trivi
a3046b6f7f Implement clean killing of the TTS service.
If files were being synthesized to while the service was being killed,
it would have left partially written files (with no header). This CL
checks if the service is rendering to a file at the time the service
is destroyed: if it is, it will stop the rendering and deletes the file.
2009-08-26 17:06:52 -07:00
Jean-Michel Trivi
0deb41abc6 am 0950c5de: Merge change 21226 into donut
Merge commit '0950c5de864d1ad83ed96efc5c2d1569b4d36188' into eclair

* commit '0950c5de864d1ad83ed96efc5c2d1569b4d36188':
  Fix bug 2046705 where the output of the speech synthesizer is too low.
2009-08-18 08:44:51 -07:00
Jean-Michel Trivi
4fb7d882b2 Fix bug 2046705 where the output of the speech synthesizer is too low.
The language files for the SVOX Pico engine result in the output of
the synthesizer to be too soft, and barely audible on a phone speaker.
The change implements a low shelf filter on the output of the synthesis
and a drastic amplification. This works as intended because the
synthesized data contains too much energy in the lower frequencies that
is wasted on a phone speaker. Once filtered out, they leave room for
amplication to address the volume issue.
2009-08-14 10:05:19 -07:00
Jean-Michel Trivi
337cf910b3 am eccd6fdd: Merge change 20673 into donut
Merge commit 'eccd6fdd0d86b8610b738fc15c707eedc00ec9dc'

* commit 'eccd6fdd0d86b8610b738fc15c707eedc00ec9dc':
  Fix bug 2043140.
2009-08-12 12:04:40 -07:00
Jean-Michel Trivi
69e67a3e2e Fix bug 2043140.
A race condition is encountered when an application invokes shutdown()
on its TextToSpeech object while is has speak() requests still running.
Since the TTS service destructor releases the synthesizer resources and
sets the corresponding synth reference to null, an NPE was observed.
The fix consists in catching NPEs whenever the sNativeSynth object is
accessed, and return the matching error for the call.
This change is a "low risk" version of the fix for bug 2025765i (same
issue) which was reverted because it was higher risk than this CL:
it affected the logic of each call to sNativeSynth. This CL only sets
an error code when an NPE is fired because sNativeSynth is null.
2009-08-11 15:09:45 -07:00
Jean-Michel Trivi
ff14d457c4 am fbe89ec6: Revert "Fix bug 2025765."
Merge commit 'fbe89ec6404978da7899b944d989dd9f50a468b5'

* commit 'fbe89ec6404978da7899b944d989dd9f50a468b5':
  Revert "Fix bug 2025765."
2009-08-04 10:54:07 -07:00
Jean-Michel Trivi
fbe89ec640 Revert "Fix bug 2025765."
This reverts commit 9ebb59b8aa75cab1e5bb53983893b579abb63edd.
2009-08-04 09:23:18 -07:00
Android (Google) Code Review
7a17cf3418 am 377b21e9: Merge change 9502 into donut
Merge commit '377b21e9f531e3fec1a5849453f886b5462e4144'

* commit '377b21e9f531e3fec1a5849453f886b5462e4144':
  Fix bug 2025765.
2009-08-03 11:54:24 -07:00
Jean-Michel Trivi
9ebb59b8aa Fix bug 2025765.
Talkback produced a null pointer exception when being enabled and disabled
repeatedly due to a race condition between the onDestroy() of the service,
and the use of the service itself. The error occurs when one Talkback
thread initiates the destruction of the service (call to onDestroy()) when
it invokes shutdown() on its TextToSpeech instance (the client of the
service). At the same time, Talkback tries to say that "Accessibility" is
unchecked from another thread. During onDestroy(), the reference to the
TTS engine (sNativeSynth) is reset to null, which is used in the service
in speakInternalOnly(), and setLanguage().
The fix consists in the addition of a static variable that signals that
the service has entered onDestroy(). Once this flag is set, all method
invocations on sNativeSynth will be dismissed. Note that access to the
native resources used by sNativeSynth are synchronized at the native
layer, therefore preventing sNativeSynth.shutdown() to interfere with
a sNativeSynth.speak() call already underway.
2009-08-03 11:07:46 -07:00
Android (Google) Code Review
cdc0d941e8 am 2bad713f: Merge change 8860 into donut
Merge commit '2bad713f31d642d5350949b90b3abe00fbd9ca55'

* commit '2bad713f31d642d5350949b90b3abe00fbd9ca55':
  Fix bug 2017664
2009-07-30 06:56:37 -07:00
Jean-Michel Trivi
ed06578edd Fix bug 2017664
Removed the TTS_ prefix in the TextToSpeech class to follow the standard naming convention.
Moved the TTS-related intents from the Intent class to TextToSpeech and TextToSpeech.Engine.
Renamed the TextToSpeech.Engine constants that are used as extras for the
  ACTION_TTS_CHECK_TTS_DATA intent to prefix them with EXTRA_.
Cleaned up the other TextToSpeech.Engine constant to remove superfluous mentions of
  "TTS" in the name.
2009-07-29 11:26:10 -07:00
Android (Google) Code Review
0326beef19 am 79858fe2: Merge change 8678 into donut
Merge commit '79858fe2f5b088ad93e461ea94e544bfce3c2e09'

* commit '79858fe2f5b088ad93e461ea94e544bfce3c2e09':
  Fixing bug #2008185 - problem with the TTS dropping
2009-07-27 15:09:59 -07:00
Charles Chen
0dbc6a44bb Fixing bug #2008185 - problem with the TTS dropping
utterances under heavy load was caused by the speech
queue being locked. Switched to using a timeout with
tryLock so that the TTS service does not give up
immediately.
2009-07-27 14:09:58 -07:00