summaryrefslogtreecommitdiffstats
path: root/core/java/android/speech
Commit message (Collapse)AuthorAgeFilesLines
* Udpate instrumentation codeWilliam Clark2015-11-301-1/+1
| | | | | | Added changes to support new features in QSSP Change-Id: I92c0a4eb3cb5363fbf08185f25644a3202c38788
* SEEMP: Add more framework instrumentationWilliam Clark2015-10-061-0/+1
| | | | | | | | | Instrument framework files to log events of interest. Conflicts: core/java/android/accounts/AccountManager.java Change-Id: Ia45651e6352586f910039b51cac2356f65f80010
* NPE occured when trying to parcel voice features.Niels Egberts2015-08-051-1/+2
| | | | | | | The default features member should be an empty list instead of null. Bug: 22404239 Change-Id: Ia39982f17fd3b3cd0f3556435170aed2fac14fb8
* Fix crash with engines that don't override getVoices().Niels Egberts2015-06-262-3/+16
| | | | | | | | | | | The name of the voices was not normalized in getVoices(), therefore if you use getDefaultVoiceName, that name possibly doesn't appear in getVoices(). The framework would then run into a NullPointerException. This was caught by the cts tests. Also added a few more log statements. BUG: 22115315 Change-Id: I51404ddcd1bc10dd3e1ddaac410cfa9873bf1438
* Delete android.speech.srec.*Narayan Kamath2015-06-165-1295/+0
| | | | | | | | This code had an undeclared dependency on libsrec_jni which we no longer build. bug: 21855957 Change-Id: Ie00645960b18aaa2a7d944a2ad31ff57e0b0b2ba
* Fixes for API Review: android.speech.ttsPrzemyslaw Szczepaniak2015-06-121-6/+6
| | | | | Bug: 21571893 Change-Id: Icd25f4aa9a465050c7410c7bfec004a71ba24548
* Add getCallingUid() to RecognitionService.Callback.Cedric Ho2015-05-271-6/+20
| | | | Change-Id: I596471625eee24ec93d08650c33461d35ad0aa07
* Don't strip country and variant from locale.Niels Egberts2015-05-071-29/+46
| | | | | | | | | | | | | | | | | | | | | When the synthesizer returns LANG_AVAILABLE or LANG_COUNTRY_AVAILABLE for a certain locale, we strip the country and variant from the locale before asking the synthesizer for the default voice name for this locale. This can prevent the synthesizer from picking the right locale. For instance it prevents the synthesizer from picking en-gb if en-au is requested, now it can only have a single preferred voice for all English countries. The solution is not to strip the country and variant from the locale. This is not likely to break anything, because the input to onGetDefaultVoiceNameFor was never expected to be a subset of all supported language-country-variant combinations. The default implementation handles this correctly. Change-Id: I017f69d321039c7aa7a3ef5a09ba138e35b66670 (cherry picked from commit 4758e99783493fc546e6819b5fe9d44e1ef8c318)
* Add android.speech.RecognizerIntent EXTRA_PREFER_OFFLINE to indicateCedric Ho2015-04-271-0/+8
| | | | | | whether to only use an offline speech recognition engine. Change-Id: I15fe9b31f74af1438a018a76a9c7755b43bdc835
* Fix parens typos in documentation.Niels Egberts2015-04-101-3/+3
| | | | Change-Id: I4853ed72904985b1dab11f26cd6c5a332b884fc8
* Add resource type annotations to some APIsTor Norbye2015-03-131-1/+1
| | | | Change-Id: I37c8afdaea455aa92bc8270bb2dfd60616c5f9bc
* Remove unused imports in frameworks/base.John Spurlock2015-02-285-6/+0
| | | | Change-Id: I031443de83f93eb57a98863001826671b18f3b17
* Add @ResourceInt annotations on APIsTor Norbye2015-02-181-2/+3
| | | | Change-Id: I119cc059c2f8bd98fd585fc84ac2b1b7d5892a08
* Add UtteranceProgressListener#onStop callbackPrzemyslaw Szczepaniak2014-12-094-14/+90
| | | | | | | | | | | | | | | New UtteranceProgressListener callback that allows to detect a call to TextToSpeech#stop() (or QUEUE_FLUSH usage) from the same client, or a QUEUE_DESTROY usage from any other client (Talkback uses it to preempt other users of TextToSpeech queue). This change is required for seamless Books read aloud feature+Talkback usage. + Fixes for broken tests/TtsTests Bug: 17901521 Change-Id: I30d2f297bb7c8d05cbeb16f63e85c1be0cca5c84
* Fix race in RecognizerService teardown.Jeff Brown2014-10-021-11/+19
| | | | | | | | Use a WeakReference to refer to the outer class to prevent leaks. Ensure atomicity of access to the reference. Bug: 17584947 Change-Id: I7ad7c7793b60fa125e04fc4d803ed905e8a00a95
* Make sure cancel is called on tear down.Jerome Poichet2014-09-302-1/+20
| | | | | | | | | | - Make sure cancel is called when consumer of SpeechRecognizer calls destroy. - If consumer goes away, make sure to call cancel as well. b/17584947 Pressing mic button in Music hoses audio Change-Id: Ibe1198b37fe6167493a8694f9089d970f1eb07de
* Fix ambiguous TTS#playSilence method.Przemyslaw Szczepaniak2014-09-253-18/+18
| | | | | | | | | | | | | Due to recent fixes for TTS API review (b/17389935) overloaded playSilence method became ambiguous when the last argument is null. This change renames the new method to playSilentUtterance solving the issue. Also, since LMP API level is 21, I updated invalid references to it as API level 20 inside speech.tts. Bug: 17389935 Change-Id: I9f9fae988240d1cec45d44650e53ffc29803ccac
* Fix issues with new TTS APIPrzemyslaw Szczepaniak2014-09-223-18/+4
| | | | | Bug: 17389935 Change-Id: I59234b3222f59dc89be7e40f7d4706b1f8c610ce
* Replace TreeSet with HashSet.Przemyslaw Szczepaniak2014-09-111-5/+4
| | | | | | | Both Locale and Voice do not implement Comparable. Bug: 17467923 Change-Id: I683577e5b18ae1892e1ccea5ea241e1d016c9517
* API review requests for the TTS package.Przemyslaw Szczepaniak2014-09-083-33/+130
| | | | | | | | | | | | - New TextToSpeechService methods are no longer protected. - s/getRequiresNetworkConnection/isNetworkConnectionRequired - New TextToSpeec#play.. methods use a Bundle instead of a HashMap - New synthesizeToFile(), addSpeech(), addEarcon() methods take a File instead of a String with filepath. - TextToSpeechService#s/isValidVoiceName/onIsValidVoiceName Bug:17389935,17253934 Change-Id: Iec76f59015c34104683c050fe1ff1ceccd604134
* Set the TTS voice name for the default language.Przemyslaw Szczepaniak2014-08-051-0/+5
| | | | | | | | | | | | | | This changes makes the initial, default language set and the #setLanguage call with the default language as input exactly the same. Previously, the requests made after the initial default language set were missing the name of the default voice. + Some tests clean-up. Some of them fail due to issues with Locale#toLanguageTag upper-casing the variant field. Change-Id: I5470617007fe45462b7198bf62a03eb5fe47a590
* API for audio session ID generationJean-Michel Trivi2014-07-201-1/+1
| | | | | | | | | | | | Expose the value used by the framework to generate an audio session ID when a value isn't known. Rename allocateAudioSessionId() to generateAudioSessionId() as this operation doesn't "allocate" anything, and there is no allocated resource to free after this operation. Bug 16401631 Change-Id: I7a7bc05b39ea0b024ff225254eb755a9c85a2ad9
* Add AudioAttributes support in the TTS.Przemyslaw Szczepaniak2014-07-174-24/+81
| | | | | Bug: 16259299 Change-Id: I53f4f7a2b9a3b9a422affaf6abe4aca258e67d7f
* Fix TTS regression, TTS#stop can result in #onDone callback.Przemyslaw Szczepaniak2014-07-103-33/+4
| | | | | | | | | | | | Regressinon in the L, side effect of the rewrite. In pre-L android, UtteranceProgressListener#onDone was called (but only if client received UtteranceProgressListener#onStart for the utterance in progress) after client called TextToSpeech#stop. This changeset reinstates this behaviour. + Removed not used fallback callback Bug: 16149006 Change-Id: I2eb5ede0abe6f5717b07f09adad861465575c238
* Remove Markup and Utterance classes.Niels Egberts2014-07-082-1132/+0
| | | | | | | Markup is replaced by TtsSpan, and the Utterance class will be replaced by TtsSpanBuilder. Change-Id: I443786681f065ad8458fc05825de3ef182db8062
* Add support for voices in TTS API.Przemyslaw Szczepaniak2014-07-047-15/+903
| | | | | | | | Voices allow to expose multiple backends/voice packs for a single Locale. This is an attempt to port this feature from V2 API. Bug: 15834470 Change-Id: I0117de238cfcf028bcec5344b8d65c960b96b98c
* First argument of playSilence is incorrect in javaDoc.Niels Egberts2014-07-021-1/+1
| | | | Change-Id: Icc059471e61fb6154108b74ea45cb06554d80631
* Forgot to deprecate a method in current.txt before merging earlier change.Niels Egberts2014-07-021-5/+9
| | | | | | Also includes a comment fix and line size changes in TextToSpeech.java. Change-Id: Ia5842b694bca6cd9cae035164ffc605451e72d8b
* Support for CharSequences in the V1 API.Niels Egberts2014-07-024-45/+249
| | | | | | | | Two newly deprecated methods: - TextToSpeech.speak (over TextToSpeech.speak with mandatory utteranceId) - SynthesisRequest.getText (over SynthesisRequest.getCharSequenceText) Change-Id: I8a75ed335c91074c72d6ef374ff8b9c79a7c208d
* Add support for audio session id in the TTSPrzemyslaw Szczepaniak2014-07-026-68/+139
| | | | | | | + #playEarcon & #queueAudio respects request Volume/Pan settings. Bug:15432115 Change-Id: I136afef77afbc56c34810c64123f7be4b431d378
* Remove TextToSpeechClient API.Przemyslaw Szczepaniak2014-06-3023-2947/+109
| | | | | | | Removed all of TTS V2 api with exception of error codes. Bug: 15834470 Change-Id: I9d9d2aad01811af9b86bf7a3fd018a8d4e5c2f33
* Fix typo and broken sdk build.Przemyslaw Szczepaniak2014-06-131-1/+1
| | | | Change-Id: Icd1641955d1ca88396219db05312a4a9fd77ea80
* Merge "Expose "default tts locale" to the TTS V2 API."Przemyslaw Szczepaniak2014-06-115-105/+168
|\
| * Expose "default tts locale" to the TTS V2 API.Przemyslaw Szczepaniak2014-06-115-105/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change allows TTS V2 API client applications to honor the "default TTS locale" set by the user in the TTS settings. Note that the TTS V1 API uses 3 character country/language codes for locale encoding. It's the only system component that does that. TTS V2 uses the standard, valid Locale objects. The default TTS locale setting was stored as a 3 character locale string with "-" as the separator. This change switches the TTS locale setting format to the output of Locale.toString() call (on a valid Locale object). Methods used for reading this value can interpret both forms and try to return a valid Locale object as an output. Change-Id: Ice2e6c25a43eb9dd6e17d371ee582c2dae3329c9
* | Add missing copyright headers in speech.ttsPrzemyslaw Szczepaniak2014-06-124-0/+60
| | | | | | | | Change-Id: Icf1c3cf71ac45cb00606c8034af375e657c31ea5
* | Add missing #isSpeaking to TTS API V2Przemyslaw Szczepaniak2014-06-041-24/+65
|/ | | | | | | | TextToSpeech#isSpeaking queries TTS engine if it's currently outputting any audio, it was present in the TTS API V1. Change-Id: Iee4a91976b9b80653811fb458ac48d75418752cf
* Markup support for frameworkNiels Egberts2014-05-305-21/+1269
| | | | Change-Id: Ia5ad6cff7593c295944a90775a1b061c95f5cc3f
* TTS Connection callbacks are called on main thread.Przemyslaw Szczepaniak2014-05-162-3/+36
| | | | | | | | | | | | | After experimenting with the new TTS API I found out that receiving ConnectionCallbacks#onEngineStatusChange and #onServiceDisconnected callbacks on non-main thread are problematic. They are very rare and overhead of dealing with them in separate thread is high - in most cases user just wants to process those callbacks in the main thread context. This change should make new API usage easier. + Fixed default values of speech speed in voices from v1->v2 wrapper. Change-Id: I76d3b607b3b931b7eb10aa180775fd3607c43bd9
* Add (hidden) TTSEngines#isLocaleSetToDefaultForEngine method.Przemyslaw Szczepaniak2014-05-121-0/+18
| | | | | | | | TTSEngines#isLocaleSetToDefaultForEngine allows the Settings application to distinguish if the TTS engine locale is blank (set to follow the device locale) or if it's set to the same value as the device locale. Change-Id: I462584547d69c21cde4ac317c8a3b3bbc1680cae
* Add AudioFormat.getBytesPerSample and use itGlenn Kasten2014-05-062-14/+2
| | | | Change-Id: I90a40987ea99006af4a6e31136078c04976eb54d
* Remove "final" from TextToSpeechClient class.Przemyslaw Szczepaniak2014-04-101-2/+2
| | | | | | | | | It hinders attempts to mock the TextToSpeechClient class in tests. + javadoc typo fix Change-Id: I5b4590824d7e89b58451bdde457a627786333373
* Documentation update for TextToSpeech#getFeaturesPrzemyslaw Szczepaniak2014-03-241-0/+1
| | | | | | | Added note that it may return null in case of error. Bug: 12323454 Change-Id: I246f7e894c5e8a6421bdd72c7623c72e8a13fc3a
* Do not reset language in case of the TTS service reconnect.Przemyslaw Szczepaniak2014-03-211-4/+6
| | | | | Bug:12428804 Change-Id: I0b1b1274c47edd28eae1701808d50aeb6c36324c
* Make InternalListener static to avoid referencing SpeechRecognizer.Mark Renouf2014-03-171-1/+1
| | | | Change-Id: I03bc1a5f5188551608395f3468aa69e622601820
* Add public SynthesisRequestV2 constructor.Przemyslaw Szczepaniak2014-01-301-0/+12
| | | | | | | | | While implementing the new TTS API, I found out that it's very difficult to create an SynthesisRequestV2 instance for testing purposes - it's a final class, with no publicly visible constructors. Bug: 8259486 Change-Id: I88b84fd8ad1ac6960f3932863ca758657f9547ff
* Allow clients to extend the TTS UtteranceId class.Przemyslaw Szczepaniak2014-01-301-22/+15
| | | | | | | | | | | | | | This change allows TTS clients to create (and use) classes derived from the UtteranceId class. This allows to attach a custom data and methods that can be reached later in callbacks that take the UtteranceId instance as parameter. Also, since we can't depend on the identityHashCode results being unique, this change adds AtomicInteger to generate unique identifiers for UtteranceId instances. Bug: 8259486 Change-Id: Id1e9eabc890ec585a7f8570fd20e287dcda9a11d
* am 8bb8caa2: am c12410f1: am c3be4ba3: am 12377887: am 991e9818: Merge ↵Elliott Hughes2014-01-162-74/+74
|\ | | | | | | | | | | | | "AArch64: Use long for pointers in speech/srec classes" * commit '8bb8caa2b1c38bdc273082b710e2d089889aea5a': AArch64: Use long for pointers in speech/srec classes
| * AArch64: Use long for pointers in speech/srec classesAshok Bhat2014-01-152-74/+74
| | | | | | | | | | | | | | | | | | | | | | | | For storing pointers, long is used in speech/srec classes, as native pointers can be 64-bit. Note corresponding JNI files are in the external/srec project under srec_jni directory. Change-Id: Iacd10840e81f5acc3eb202424f83b49ae4eb23ab Signed-off-by: Marcus Oakland <marcus.oakland@arm.com> Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
| * Catch MissingResourceException caused by bad locale in TTS.Przemyslaw Szczepaniak2013-10-302-20/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Malformed locale objects will throw MissingResourceException from getISO3Country() and getISO3Language() methods. This change guard against the case where device default locale is malformed and user tries to get TTS default locale (b/10814409) and case where user tries to pass bad locale as argument to TextToSpeech.getFeatures method (b/10494193). Bug:11429552 Bug:10494193 Bug:10814409 Change-Id: Ie54d5d30bb042324da0c0d19b77c3a932c5642f7 (cherry picked from commit 58f16653728417100c61b5cb63298e0e3bb528dc)
* | Remove unused imports from frameworks/base.John Spurlock2013-11-203-7/+0
| | | | | | | | Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906