xref: /aosp_15_r20/development/samples/VoiceRecognitionService/_index.html (revision 90c8c64db3049935a07c6143d7fd006e26f8ecca)
1*90c8c64dSAndroid Build Coastguard Worker<p>A sample application that demonstrates Android's pluggable voice recognition framework.</p>
2*90c8c64dSAndroid Build Coastguard Worker
3*90c8c64dSAndroid Build Coastguard Worker<p>This application includes a
4*90c8c64dSAndroid Build Coastguard Worker<a href="src/com/example/android/voicerecognitionservice/VoiceRecognitionService.html">
5*90c8c64dSAndroid Build Coastguard Workersample voice recognition service</a> (a subclass of
6*90c8c64dSAndroid Build Coastguard Worker<code><a href="../../../reference/android/speech/RecognitionService.html">RecognitionService</a></code>),
7*90c8c64dSAndroid Build Coastguard Workerand a <a href="src/com/example/android/voicerecognitionservice/VoiceRecognitionSettings.html">
8*90c8c64dSAndroid Build Coastguard Workersettings activity</a> for that service. It shows the basic skeleton for setting up a recognition
9*90c8c64dSAndroid Build Coastguard Workerservice and exposing its settings activity to settings.</p>
10*90c8c64dSAndroid Build Coastguard Worker
11*90c8c64dSAndroid Build Coastguard Worker<p>The behavior is extremely simple - it does no real voice recognition, and just returns a
12*90c8c64dSAndroid Build Coastguard Workerfixed set of results immediately. The results can be either a set of letters or numbers, as
13*90c8c64dSAndroid Build Coastguard Workerchosen by the user in the simplistic settings activity.</p>
14*90c8c64dSAndroid Build Coastguard Worker
15*90c8c64dSAndroid Build Coastguard Worker<p>Installing this application onto a device that already has a voice recognition service
16*90c8c64dSAndroid Build Coastguard Workeravailable will expose a new option under "voice input &amp; output" settings, to let the
17*90c8c64dSAndroid Build Coastguard Workeruser choose between the multiple services.</p>
18*90c8c64dSAndroid Build Coastguard Worker
19*90c8c64dSAndroid Build Coastguard Worker<p>Note that due to its simplicity, this voice recognition service is not compatible with
20*90c8c64dSAndroid Build Coastguard Workerevery application that wishes to use voice recognition. For example, because Google's
21*90c8c64dSAndroid Build Coastguard WorkerVoiceSearch application relies on more than just simple text results, it may not work
22*90c8c64dSAndroid Build Coastguard Workeras expected if this sample recognition service is chosen in settings. Other simpler
23*90c8c64dSAndroid Build Coastguard Workerapplications, like voice input on the keyboard (e.g., in LatinIME), are more likely to
24*90c8c64dSAndroid Build Coastguard Workerwork as expected - returning just the very simple list of results to the application.</p>
25*90c8c64dSAndroid Build Coastguard Worker
26*90c8c64dSAndroid Build Coastguard Worker<p>See also:</p>
27*90c8c64dSAndroid Build Coastguard Worker<ul>
28*90c8c64dSAndroid Build Coastguard Worker  <li><a href="../../../reference/android/speech/RecognitionService.html">RecognitionService</a></li>
29*90c8c64dSAndroid Build Coastguard Worker</ul>