The purpose of this patch is to add a C-based ABI that can be exposed by the NDK
for developers wanting to write a TTS Engine. This replaces the C++ ABI that is
currently under frameworks/base/include/tts/TtsEngine.h but is *binary* compatible
with it.
As a consequence, the svox pico plugin under external/svox/pico/tts/, which
links against tts/TtsEngine.h can be loaded by the TTS service properly.
Another patch would modify the pico tts to use <android/tts.h>, then we will
be able to get rid of <tts/TtsEngine.h> in the source tree.
Change-Id: I16844cef9b5b006cc32655a29e4f9f193c8c1a91
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
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
via a ContentProvider to the TtsService so that the TtsService can
invoke their .so file with those settings.
Change-Id: Icd0e966971c36ebb4da191a50cda96d6f4525df5
before using it; if the engine is not enabled, TtsService will fall
back to using the default system engine.
Change-Id: I401f9c19cc1351c0ae6daf2b11069e5036febc51
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.
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.
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
Merge commit '014085a8727d7e10a4d39cba4a6d27826b66bc00'
* commit '014085a8727d7e10a4d39cba4a6d27826b66bc00':
Fix for a race condition that can occur if an utterance
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.
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.
Merge commit '0950c5de864d1ad83ed96efc5c2d1569b4d36188' into eclair
* commit '0950c5de864d1ad83ed96efc5c2d1569b4d36188':
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.
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.
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.