Skip to content

Commit

Permalink
STT: Add docs for offline STT on Android
Browse files Browse the repository at this point in the history
  • Loading branch information
KeyWeeUsr committed Dec 1, 2018
1 parent 7ea43b5 commit 8193cfa
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion plyer/facades/speech.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
class Speech(object):
'''
.. versionadded:: 1.3.3
Speech Recognition facade.
In order to check that your device supports voice recognition use method
Expand All @@ -11,7 +13,7 @@ class Speech(object):
Use `start` to start voice recognition immediately and `stop` to stop.
.. note::
Needed permissions for Android: `RECORD_AUDIO` (and `NETWORK` if you
Needed permissions for Android: `RECORD_AUDIO` (and `INTERNET` if you
want online voice recognition API to be used)
.. note::
Expand All @@ -23,6 +25,28 @@ class Speech(object):
with `android.speech.RecognitionService` implementation present
in the system. Mostly it's `com.google.android.googlequicksearchbox`
or "Google" application (the search bar with the launcher widget).
Offline Speech Recognition on Android
-------------------------------------
Requires any application that provides an
`android.speech.RecognitionService` implementation to the other apps. One
of such applications is on a lot of devices preinstalled Google (quick
search box).
The API prefers offline recognition, but should be able to switch to online
alternative in case you don't have a language package installed (`INTERNET`
permission necessary).
You can enable offline speech recognition this way (Android 8.1):
* open the `Settings` app
* choose `Language & Input` / `Language & Keyboard` (Samsung might include
it in the `General` category)
* choose `On-Screen keyboard` or `Voice search`
* choose `Google Keyboard`
* choose `Offline Speech recognition`
* download language package if you don't have one already
'''

_language = 'en-US'
Expand Down

0 comments on commit 8193cfa

Please sign in to comment.