summaryrefslogtreecommitdiffstats
path: root/content/browser/speech/speech_recognizer_impl_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* content: Remove use of MessageLoopProxy and deprecated MessageLoop APIsskyostil2015-06-051-2/+1
| | | | | | | | | | | | | | | This patch was mostly autogenerated with https://codereview.chromium.org/1010073002/. BUG=465354 TBR=nick@chromium.org Committed: https://crrev.com/422456f9d53f0bf936a64f21a1463fd0abd3df84 Cr-Commit-Position: refs/heads/master@{#333081} Review URL: https://codereview.chromium.org/1159623009 Cr-Commit-Position: refs/heads/master@{#333112}
* Revert "content: Remove use of MessageLoopProxy and deprecated MessageLoop APIs"skyostil2015-06-051-1/+2
| | | | | | | | | | | | | This reverts commit 422456f9d53f0bf936a64f21a1463fd0abd3df84. TBR=zea@chromium.org BUG=465354 NOTRY=true NOTREECHECKS=true Review URL: https://codereview.chromium.org/1170623003 Cr-Commit-Position: refs/heads/master@{#333086}
* content: Remove use of MessageLoopProxy and deprecated MessageLoop APIsskyostil2015-06-051-2/+1
| | | | | | | | | | | | This patch was mostly autogenerated with https://codereview.chromium.org/1010073002/. BUG=465354 TBR=nick@chromium.org Review URL: https://codereview.chromium.org/1159623009 Cr-Commit-Position: refs/heads/master@{#333081}
* Revert "content: Remove use of MessageLoopProxy and deprecated MessageLoop APIs"skyostil2015-06-051-1/+2
| | | | | | | | | | | | | | | This reverts commit 5d18b2493af36d77d3c491854e3d56f46f5f747c. Reason: Broke iOS build: http://build.chromium.org/p/chromium.mac/builders/iOS_Simulator_%28dbg%29/builds/27843 NOTRY=true NOTREECHECKS=true BUG=465354 TBR=sievers@chromium.org,nick@chromium.org Review URL: https://codereview.chromium.org/1153503009 Cr-Commit-Position: refs/heads/master@{#333047}
* content: Remove use of MessageLoopProxy and deprecated MessageLoop APIsskyostil2015-06-051-2/+1
| | | | | | | | | | | | This patch was mostly autogenerated with https://codereview.chromium.org/1010073002/. BUG=465354 TBR=nick@chromium.org Review URL: https://codereview.chromium.org/1159623009 Cr-Commit-Position: refs/heads/master@{#333043}
* Remove URLRequestStatus mutators and introduce FromError.davidben2015-06-031-10/+4
| | | | | | | | | | | | As the first step to folding URLRequestStatus into net errors, remove mutators so callers are required to specify status and error together. Also add a FromError function which sets the status field automatically. BUG=490309 Review URL: https://codereview.chromium.org/1164823002 Cr-Commit-Position: refs/heads/master@{#332625}
* Rename from ERROR_AUDIO to ERROR_AUDIO_CAPTUREdjmix.kim2015-04-231-2/+2
| | | | | | | | | | | | | Spec draft proposal : https://dvcs.w3.org/hg/speech-api/raw-file/tip/webspeechapi.html#speechreco-error Some attributes of SpeechRecognitionError are not same as latest specification. We need to change from "SPEECH_RECOGNITION_ERROR_AUDIO" to "SPEECH_RECOGNITION_ERROR_AUDIO_CAPTURE" BUG=116954 Review URL: https://codereview.chromium.org/1075443004 Cr-Commit-Position: refs/heads/master@{#326471}
* Standardize usage of virtual/override/final specifiers.dcheng2014-10-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Google C++ style guide states: Explicitly annotate overrides of virtual functions or virtual destructors with an override or (less frequently) final specifier. Older (pre-C++11) code will use the virtual keyword as an inferior alternative annotation. For clarity, use exactly one of override, final, or virtual when declaring an override. To better conform to these guidelines, the following constructs have been rewritten: - if a base class has a virtual destructor, then: virtual ~Foo(); -> ~Foo() override; - virtual void Foo() override; -> void Foo() override; - virtual void Foo() override final; -> void Foo() final; This patch was automatically generated. The clang plugin can generate fixit hints, which are suggested edits when it is 100% sure it knows how to fix a problem. The hints from the clang plugin were applied to the source tree using the tool in https://codereview.chromium.org/598073004. BUG=417463 R=nasko@chromium.org Review URL: https://codereview.chromium.org/678073006 Cr-Commit-Position: refs/heads/master@{#301534}
* Standardize usage of virtual/override/final in content/browser/dcheng2014-10-211-13/+14
| | | | | | | | | | | | This patch was automatically generated by applying clang fixit hints generated by the plugin to the source tree. BUG=417463 TBR=sky@chromium.org Review URL: https://codereview.chromium.org/667943003 Cr-Commit-Position: refs/heads/master@{#300469}
* Replacing the OVERRIDE with override and FINAL with final in ↵mohan.reddy2014-10-071-12/+12
| | | | | | | | | | | | | content/browser/speech This step is a giant search and replace for OVERRIDE and FINAL to replace them with their lowercase versions. BUG=417463 Review URL: https://codereview.chromium.org/631083002 Cr-Commit-Position: refs/heads/master@{#298388}
* Modifies AudioInputCallback::OnData and use media::AudioBus instead of plain ↵henrika@chromium.org2014-06-191-22/+29
| | | | | | | | | | | | | | byte vector (Relanding). Second attempt to land https://codereview.chromium.org/314713002/ which has been reverted. TBR=dalecurtis BUG=375155 TEST=WebRTC and WebSpeech demos Review URL: https://codereview.chromium.org/344583002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278345 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 277794 "Modifies AudioInputCallback::OnData and use media..."macourteau@chromium.org2014-06-171-29/+22
| | | | | | | | | | | | | | | | > Modifies AudioInputCallback::OnData and use media::AudioBus instead of plain byte vector > > BUG=375155 > TEST=WebRTC and WebSpeech demos > > Review URL: https://codereview.chromium.org/314713002 R=henrika@chromium.org TBR=henrika@chromium.org Review URL: https://codereview.chromium.org/335343004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277814 0039d316-1c4b-4281-b951-d872f2087c98
* Modifies AudioInputCallback::OnData and use media::AudioBus instead of plain ↵henrika@chromium.org2014-06-171-22/+29
| | | | | | | | | | | byte vector BUG=375155 TEST=WebRTC and WebSpeech demos Review URL: https://codereview.chromium.org/314713002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277794 0039d316-1c4b-4281-b951-d872f2087c98
* Adds error codes to AudioInputController/AudioInputRendererHost native logshenrika@chromium.org2014-02-281-2/+4
| | | | | | | | BUG=347433 Review URL: https://codereview.chromium.org/183023005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254224 0039d316-1c4b-4281-b951-d872f2087c98
* Speech recognition: Fixing erroneous DCHECK usagetommyw@chromium.org2014-01-161-2/+1
| | | | | | | | | | | When using the legacy API both continuos and provisional_results are false, and in the JS API they are by default false but can be set to true independently. The DCHECKs didn't allow for this and erroneously triggered for some API usages; like the implementation on google.com. Review URL: https://codereview.chromium.org/137853010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245125 0039d316-1c4b-4281-b951-d872f2087c98
* Rename speech test methods to *ForTesting instead of *ForTests.janx@chromium.org2013-10-011-1/+1
| | | | | | | | | | | This allows these methods to be checked by the "*ForTesting" hook in the presubmit checks. BUG=301679 Review URL: https://codereview.chromium.org/25276002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226300 0039d316-1c4b-4281-b951-d872f2087c98
* added device selection to web speech to use the correct device. Users should ↵xians@chromium.org2013-06-201-11/+12
| | | | | | | | | | | | be able to choose which microphone to be used via UI. BUG=112472 TEST=https://www.google.com/intl/en/chrome/demos/speech.html verify we can use different device to do the speech recognition. Review URL: https://chromiumcodereview.appspot.com/17377003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207328 0039d316-1c4b-4281-b951-d872f2087c98
* Moves WebSpeech to the low-latency audio backend.henrika@chromium.org2013-06-171-1/+1
| | | | | | | | | | | Also uses https://codereview.chromium.org/16955009 to resolve iOS linking issues. BUG=112472 TEST=https://www.google.com/intl/en/chrome/demos/speech.html and content_unittests on Linux, Mac and Windows. Review URL: https://chromiumcodereview.appspot.com/16658006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206723 0039d316-1c4b-4281-b951-d872f2087c98
* Call scoped_refptr<T>::get() rather than relying on implicit "operator T*"rsleevi@chromium.org2013-06-111-1/+1
| | | | | | | | | | | | | | | | | | | This upates calls to bound temporary objects to also use get(). While it has the same semantic equivalence to the existing code, this generally represents a dangerous pattern - indeed, part of the whole motivation for this change is to make this anti-pattern very visible to authors. This change simply updates all of the call sites, to allow the "operator T*" to be removed and preventing new instances. The existing instances will then be reviewed for "suspicious" changes and updated to use/pass scoped_refptr<T> rather than T*, as appropriate. BUG=110610 TBR=darin Review URL: https://codereview.chromium.org/15984016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205560 0039d316-1c4b-4281-b951-d872f2087c98
* Extract interface from content::SpeechRecognizerjanx@chromium.org2013-05-201-0/+498
| | | | | | | | | | | | | | | SpeechRecognizer's current design assumes that the audio capture and the endpointer are always performed inside the browser. This is not going to be true for some platforms, for instance Android, where we plan to delegate not only the recognition activity, but also the audio capture and the endpointer, to the OS. TBR=avi@chromium.org (gypi) BUG=222352 Review URL: https://chromiumcodereview.appspot.com/15230003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201082 0039d316-1c4b-4281-b951-d872f2087c98
* Renamed SpeechRecognizerImpl to SpeechRecognizer and fixed some comments in ↵primiano@chromium.org2012-06-271-561/+0
| | | | | | | | | | | | the speech code. BUG=116954 TEST=none Review URL: https://chromiumcodereview.appspot.com/10661053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144435 0039d316-1c4b-4281-b951-d872f2087c98
* Introduced experimental support for interacting with the google remote ↵primiano@chromium.org2012-06-221-1/+4
| | | | | | | | | | | | | | streaming speech recognition webservice (Speech CL2.3). The support is very experimental by now and has a lot of debugging code for helping the development. BUG=116954 TEST=content_unittests:GoogleStreamingRemoteEngineTest Review URL: https://chromiumcodereview.appspot.com/10546020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143616 0039d316-1c4b-4281-b951-d872f2087c98
* Move test_url_fetcher_factory.* from content/ to net/url_requestakalin@chromium.org2012-06-191-6/+6
| | | | | | | | | | | | | | | | Also mark URLFetcherImpl as NET_EXPORT_PRIVATE instead of NET_EXPORT, as it shouldn't be used except for some code in test_url_fetcher_factory.*. Update all references. BUG=118220 TEST= TBR=jam@chromium.org,jhawkins@chromium.org,mnissler@chromium.org Review URL: https://chromiumcodereview.appspot.com/10581012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143085 0039d316-1c4b-4281-b951-d872f2087c98
* Move the rest of the content\test headers that are used by embedders to ↵jam@chromium.org2012-06-041-1/+1
| | | | | | | | | | content\public\test. This way we can enforce that internal content headers don't leak to embedders. BUG=98716 TBR=phajdan.jr Review URL: https://chromiumcodereview.appspot.com/10483003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140287 0039d316-1c4b-4281-b951-d872f2087c98
* Refactoring of chrome speech recognition architecture (Speech CL1.8)primiano@chromium.org2012-05-161-4/+4
| | | | | | | | | | | | | | | - Simplified the architecture of SpeechRecognitionManagerImpl. It does not track anymore the state of the recognizer (keeping a state var), rather it derives the state inquiring the recognizer object. After moving the bubble handling code to the delegate, in fact, only 3 states are required in the manager, and they can be inferred simply looking at the recognizer. - SpeechRecognitionManagerImpl does not handle anymore with UI related stuff (bubbles, detach, interactive, background... etc), which have been moved to ChromeSpeechRecognitionManagerDelegate. - ChromeSpeechRecognitionManagerDelegate is now more straightforward, since it implements the "universal" SpeechRecognitionEventListener interface, thus receiving the same events of the manager in the same order, and adds UI handling behavior (only bubbles for the moment) to the behavior of the manager. - Minor change: The SpeechRecognizerImpl now raises a SPEECH_RECOGNITION_ERROR_ABORTED upon Abort. It has no visible effect currently (since Abort is always raised when the bubble disappars) but makes sense for upcoming CLs, when speech input extension or JS APIs can cause an abort of the current recognition (starting a new one). BUG=116954 TEST=none Review URL: https://chromiumcodereview.appspot.com/10352007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137393 0039d316-1c4b-4281-b951-d872f2087c98
* Introducing new data types and IPC messages for scripted JS speech ↵primiano@chromium.org2012-05-151-2/+2
| | | | | | | | | | | | | | recognition APIs (Speech CL2.0) Furthermore GoogleOneShotRemoteEngineConfig struct has been renamed and moved into the (more generic) SpeechRecognitionEngineConfig, that will be shared with the streaming recognition engine implementation. BUG=116954 TEST=none Review URL: https://chromiumcodereview.appspot.com/10233010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137141 0039d316-1c4b-4281-b951-d872f2087c98
* Refactoring of chrome speech recognition architecture (CL1.6)primiano@chromium.org2012-04-191-10/+10
| | | | | | | | | | | | Renamed caller_id -> session_id in speech recognition classes. This is a partial refactoring in preparation for next CLs. BUG=116954 TEST=none. Review URL: http://codereview.chromium.org/9972008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132979 0039d316-1c4b-4281-b951-d872f2087c98
* Speech refactoring: Reimplemented speech_recognizer as a FSM (CL1.5)primiano@chromium.org2012-04-131-34/+103
| | | | | | | | | BUG=116954 TEST=none Review URL: http://codereview.chromium.org/9835049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132179 0039d316-1c4b-4281-b951-d872f2087c98
* Move media/audio files into media namespace (relanding)vrk@google.com2012-04-031-3/+7
| | | | | | | | | | BUG=115187 TEST=compiles and runs without breaking audio tag; media_unittests, content_unittests TBR=scherkus,jam Review URL: https://chromiumcodereview.appspot.com/9968054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130288 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 130180 - Move media/audio files into media namespacevrk@google.com2012-04-021-7/+3
| | | | | | | | | | | | BUG=115187 TEST=compiles and runs without breaking audio tag; media_unittests, content_unittests Review URL: https://chromiumcodereview.appspot.com/9805001 TBR=vrk@google.com Review URL: https://chromiumcodereview.appspot.com/9965076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130182 0039d316-1c4b-4281-b951-d872f2087c98
* Move media/audio files into media namespacevrk@google.com2012-04-021-3/+7
| | | | | | | | | BUG=115187 TEST=compiles and runs without breaking audio tag; media_unittests, content_unittests Review URL: https://chromiumcodereview.appspot.com/9805001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130180 0039d316-1c4b-4281-b951-d872f2087c98
* speech_recognition_requestprimiano@chromium.org2012-03-261-19/+20
| | | | | | | | | | | | | | | | | | | | | | | | - Renamed speech_recognition_request to google_one_shot_remote_engine - Audio encoder moved here (previously was in speech_recognizer). Rationale: Audio encoding is not a requirement of speech recognition. It is a need of the google_one_shot_remote_engine, due to its remote nature. speech_recognition_engine - Extracted the interface SpeechRecognitionEngine (and, accordingly, Delegate) from the former speech_recognition_request. Rationale: google_one_shot_remote_engine is just one of the possible engines (yet currently the only one) that can be exploited to recognize speech. speech_recognition_result - Added SpeechRecognitionError, encapsulating the error code and further error details (for specializing audio errors, since chrome needs them). speech_recognition_manager - Minor adaptions to the new speech_recognizer.cc - Replaced the SpeechRecognitionRequestDelegate interface with the brand new speech_recognition_event_listener BUG=116954 TEST=none Review URL: http://codereview.chromium.org/9663066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128896 0039d316-1c4b-4281-b951-d872f2087c98
* Removed the SpeechRecognizerDelegate interface and replaced with ↵primiano@chromium.org2012-03-141-103/+107
| | | | | | | | | | | SpeechRecognitionEventListener. By now it might seem just a rename of the former interface, however this interface will gradually incorporate, in the next CLs, the other delegates and become the reference interface used by all clients to interact with SpeechRecognition inside Chrome. BUG=116954 TEST=none Review URL: http://codereview.chromium.org/9688012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126721 0039d316-1c4b-4281-b951-d872f2087c98
* Stopping the audio thread before destroying the AudioManager<Platform>.xians@chromium.org2012-03-141-3/+15
| | | | | | | | | | | | | The destruction of the AudioManager family happens in order of: AudioManager<Platform>, AudioManagerBase, AudioManager. So before getting into the destruction of AudioManagerBase, we have make sure the audio thread has been stopped before AudioManager<Platform> is gone, otherwise it will end up into unexpected behavior, for example, crash because of pure virtual function. BUG=117470 TEST=media_unittests, Address Sanitizer Review URL: http://codereview.chromium.org/9692038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126635 0039d316-1c4b-4281-b951-d872f2087c98
* Added AudioBuffer/AudioChunk abstractions for speech recognition and ↵primiano@chromium.org2012-03-131-1/+45
| | | | | | | | | | | | | | | | | improved speech_recognizer_impl_unittest. audio_encoder - Introduced AudioBuffer class in order to hide the current string-based implementation (which involved a lot of dirty and distributed casts) and make room for future implementations based on a circular buffer. speech_recognizer_impl_unittest - Created MockAudioManager class, in order to avoid using the true audio manager on trybots, which could lead to errors accessing the audio device. BUG=116954 TEST=speech_recognizer_impl_uinittest should never raise errors related to the audio driver (e.g, device in use, no microphone attached, etc). Review URL: http://codereview.chromium.org/9646031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126512 0039d316-1c4b-4281-b951-d872f2087c98
* Renamed speech recognition code in preparation for introducing a new speech ↵primiano@chromium.org2012-03-071-21/+21
| | | | | | | | | | | | | | | implementation. - The general-purpose speech recognition classes (that will be needed also by future code) have been renamed to SpeechRecognition*; - The IPC Messages and dispatcher(host) classes that are only related to the current input tag (x-webkit-speech) support have been renamed to InputTagSpeech*; - The namespace has been renamed from speech_input to speech; BUG=116954 TEST= Review URL: https://chromiumcodereview.appspot.com/9568002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125378 0039d316-1c4b-4281-b951-d872f2087c98
* App a Content API around SpeechRecognizer.jam@chromium.org2012-02-231-0/+424
BUG=98716 Review URL: https://chromiumcodereview.appspot.com/9453023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123328 0039d316-1c4b-4281-b951-d872f2087c98