1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
content / public / android / java / src / org / chromium / content_public / browser / SpeechRecognition.java [blame]
// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.content_public.browser;
import org.chromium.content.browser.SpeechRecognitionImpl;
/**
* This class uses Android's SpeechRecognizer to perform speech recognition for the Web Speech API
* on Android. Using Android's platform recognizer offers several benefits, like good quality and
* good local fallback when no data connection is available.
*/
public final class SpeechRecognition {
private SpeechRecognition() {}
/**
* This method must be called before any instance of SpeechRecognition can be created. It will
* query Android's package manager to find a suitable speech recognition provider that supports
* continuous recognition.
*/
public static boolean initialize() {
return SpeechRecognitionImpl.initialize();
}
}