Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Adding support for speech library 1.0.5 containing multi-lingual capa…
Browse files Browse the repository at this point in the history
…bilities and the possibility to set a tag do identify the product using the speech API. (#633)

Landing this as other concerns will be addressed in follow-ups.
  • Loading branch information
andrenatal authored and keianhzo committed Oct 17, 2018
1 parent 388bfe3 commit ec364b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ dependencies {
implementation 'com.android.support:design:27.1.1'
implementation 'com.google.vr:sdk-audio:1.170.0'
implementation "org.mozilla.components:service-telemetry:0.26.0"
implementation "com.github.mozilla:mozillaspeechlibrary:1.0.4"
implementation "com.github.mozilla:mozillaspeechlibrary:1.0.6"
}

if (findProject(':servo')) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ private void initialize(Context aContext) {
mWidgetManager.addPermissionListener(this);

mMozillaSpeechService = MozillaSpeechService.getInstance();
mMozillaSpeechService.setProductTag("fxr");

mVoiceSearchText1 = findViewById(R.id.voiceSearchText1);
mVoiceSearchText2 = findViewById(R.id.voiceSearchText2);
Expand Down Expand Up @@ -209,6 +210,7 @@ public void startVoiceSearch() {
ActivityCompat.requestPermissions((Activity)getContext(), new String[]{Manifest.permission.RECORD_AUDIO},
VOICESEARCH_AUDIO_REQUEST_CODE);
} else {
mMozillaSpeechService.setLanguage("en-us");
mMozillaSpeechService.start(getApplicationContext());
mIsSpeechRecognitionRunning = true;
}
Expand Down

0 comments on commit ec364b0

Please sign in to comment.