Many media files and source code files were marked as executable in Git.
Remove those.
Also a shell script and python script were not marked as executable.
Change-Id: Ieb51bafb46c895a21d2e83696f5a901ba752b2c5
This fixes the issue where one thread calls .stop() on
mAudioTrack that was released (or being released) by other thread.
Bug: 7029291
Change-Id: Ia6db803e8ee40379b63327acf578466127cfabcb
- Sets the service connection to null when unbindService is called,
instead of in onServiceDisconnected. This avoids a double disconnect
if a call to onServiceConnected is received before a call to
onServiceDisconnected.
- Extended synchronize on runAction error handling and reconnection.
This prevents from reconnecting N times if N>1 threads enter this method
while there's issue with TTS service.
Bug:6993880
Change-Id: I5a387622c6032a18d17fc072029ae6be1a9b8e6c
- Fixes a strict mode violation, defers file validity checks
to when the engine starts synthesizing audio.
- Fixes some log spam when done() is called twice.
bug:6215680
bug:5415258
Change-Id: I4001be848b5208422d4091b7398e94ed311c649f
Will be seen when createStreamingAudioTrack() returns null,
which will happen if the audioflinger / audiomanager are unhealthy.
Also removes some confusing synchronization from this class.
bug:6636401
Change-Id: Iaf68a305665b7bc973898145e9cd1563e2569a2b
New action and extra for android.speech.RecognizerIntent:
ACTION_VOICE_SEARCH_HANDS_FREE
EXTRA_SECURE
Change-Id: I1f390ede4f4087bae1781347bb211dc0a093e857
Now uses a queue of runnables, one per synthesis. Also
introduce an abstraction that wraps AudioTrack that implements
the blocking semantics that we desire.
bug:5680699
Change-Id: I34a1248ff05766a7d9b3002055fb5b24aa9f230b
When stop() is called twice or after done().This relates
to bug 5662598 because users using the old deprecated API
will see two calls to onUtteranceCompleted.
bug:5662598
Change-Id: I5d59cf66b4f4c8650d3f8f9e503ac3f33132c0d0
We now use an IBinder object as an identity token of the
caller instead of Context#getPackageName.
bug:5680696
Change-Id: I1ca29e7161f709d2a85218206f3f117dfa620282
The TTS instantiated from here shouldn't clobber any
existing TTS objects opened within the same package context.
Ideally, the TTS API should work fine with multiple TTS object
instances within the same package context but making that happen
correctly is a larger change.
bug:5659758
Change-Id: Ia1f63c61b9f12ac92ff42a427a004d414e42a759
(a) onUtteranceCompleted should be called on errors too. Also,
fix up the error handling so that onUtteranceCompleted is
always called.
(b) Don't treat empty utterances as errors, and let the engine
synthesize them, as before.
bug:5662598
Change-Id: I9223592bc6fe5f47d71103f4f02f046b54a655a8
When synthesized files are written to app private data dirs,
they are written with owner/grp set to the TTS engine and
are inaccessible by the app itself. This is a reported regression
from gingerbread behaviour. Note that the dir in which the
engine writes files is itself already world writable.
bug:5523587
Change-Id: I2cb26c6f3c3d9cb3cedd60fab32c99a85a27f4b1
Also explicitly disallow locales with empty countries. This
is required to match them against the set of engine supported
locales.
bug:5309930
Change-Id: Ie9714fdc09d3081081a2393d97c31e3a42bca294
(a) Fix a null pointer exception, caused by a race condition
between stop / start calls.
(b) Fix a deadlock observed when multiple apps call stop() when
an item from one of those apps is currently being processed.
bug:5253061
Change-Id: I78533aecfda028588ce6aedb041009bc0a6f4620
This is made necessary by a bug when the utterance is smaller
than the audio buffer size. In that case, we call stop() to
flush the audio to the mixer, but that causes the playstate to
be set to stopped though some audio is still being mixed. This
breaks our waiting loop.
We now wait a fixed amount of time for such short utterances
and do not observe the playback head position.
bug:5220048
Change-Id: Ic81dec751c1faca0b14164caeda6305c8f9815fe
For each synthesis request, we inspect the number of
bytes of audio that have not been written to the mixer yet
and if that is above a certain threshold (currently 500ms),
we block the synthesis thread.
bug:5214603
Change-Id: I24c64c48466bdb96ce47b34cee7da2523ee5f0eb
It's at a very high priority currently - and will trump
foreground processes (and UI threads) which it shouldnt.
bug:5076001
Change-Id: I0d71c2941950782491ae31526a47ea6f97c38ffb
(a) Call stop() when we've written less than the
AudioTrack buffer. This forces pending buffers to
get mixed.
(b) Introduce a minimum sleep time to avoid spinlocks
if they system is busy
Change-Id: If70937e8b4e8c5d02d7dadc0d3086f97a10eb7ef
Also fixes a bug where PlaybackSynthesisCallback would
continue to pump audio to the audio playback thread after
being stopped.
Change-Id: I3233eb4858245b6e7c7df72e241a0708c668f1b4
Measurements have shown that the audio track in streaming mode
is pretty efficient as is, thanks to dalvik's JNI implementation.
Also, in streaming mode write( ) blocks until all data has been
copied to the mixer, which is the kind of behaviour we want so
that we don't have to explicitly block in our code. Also,
the java AudioTrack is thread-safe with respect to stop( ) calls
during write, which means we can do everything completeAudioAvailable
did, just as efficiently without it.
Change-Id: I70a8a108d94c7260676673979b5ea29f37fa5db4
(a) Fix an NPE reported when no TTS engine is installed.
(b) Fix a bad link, and some javadoc typos.
bug: 5004015
Change-Id: I38b97dbb5d7d4065a5ee408fae9138638ed48f40
Engines must declare a <meta-data> attribute in their
manifest with name "android.speech.tts". This must reference
an XML resource as per
com.android.internal.R.styleable.TextToSpeechEngine.
Change-Id: I56a6b9f1a360174f98c9f39da901ade83d0f38a7
This has been discussed in an email thread. This brings the
text to speech API in line with other android APIs.
The user can set default speech rates / languages and
engine preferences, which the API obeys BUT these can be
overriden by individual apps (much like intent.setComponent
and intent.setClassName can be used to launch a specific
handler for a given intent).
Also, all installed engines are enabled by default. The
user is shown the "data privacy" warning every time an
installed engine is set to the default.
Change-Id: I24f5f331b3a7cc7ce1a62962192e3a452bdca9d4
This makes it a lot easier for engine implementers
to test their engine. This is a dumb data object, and
contains no logic whatsoever.
Change-Id: I2a8bea134a8ff6b962508cfed67ea6085a682b23
(a) ensure that onInit is called exactly once per call to initTts().
(b) TtsEngines should never return an engine that is not installed.
Change-Id: Ic1ef63a9339e6d1050e3302445ca40d3ae481f61
One point to note is that no TTS engine will be selected
by default if there are no system TTS engines.
Change-Id: I397061e3cf29b8a1c66e7864262b43621ef5100d