How to use speech-to-text offline?


Question

When online



When I am connected to Wi-Fi, I am able to say "Okay Google" from any screen and it will automatically start a voice search for me and look up whatever I say. I am also able to manually start a voice search by tapping the microphone button at the top of my homescreen on the right side of the Google search bar, and my phone will search for anything I say. Lastly, when I am using the on-screen keyboard to type I can hit the small microphone button in the corner and speak whatever I want to type (which it will instantly change to text, but I have to hit the "x" with my finger to make it stop).



When offline



When I go offline (not connected to Wi-Fi or data), however, things start getting weird. I can bring down the white pull-down menu for voice search by saying "Okay Google," but after I am finished talking it will stay stuck loading on "Recognizing" for a while, until finally it will say "Can't Reach Google at the moment" (see image 2).



After messing around with things for a while, I finally got it so that when I am offline and hit the microphone button on the keyboard, I can speak my sentence and then after an absurdly long wait it will translate it into text (I don't know if this is normal or just my phone).



What I've tried/what my specs are



I have a Moto-X (second gen.). My OS is fully updated (as far as I'm aware – Android 5.1.1), and I have the most recent version of the Google app (version 5.7), the most recent Google Now Launcher app (version 1.3.large), and the most recent version of the Google+ app in case that matters (version 6.9).



In my Settings>Language & input>Google Keyboard, it is set to "English (US)."



Settings>Language & input>Google voice typing, it is set to "Automatic" and inside that the "Languages" is set to "Default language: English (US)."



Settings>Language & input>Google voice typing>Offline speech recognition, I have "English (US)" installed.



My Question



Why do the Google offline voice commands not work when I am offline and how do I make it work?



*Answers as to why the keyboard text-to-type takes forever when offline are appreciated to but they're not my main concern for this question. Thanks! :)



Image 1 Image 2



Screenshots - Click to enlarge



EDIT: As of October 2016, I got a new phone (the Moto G4 Plus) and it has the exact same problem. All the symptoms are identical and I cannot use the voice commands unless I have Internet connection, and the offline voice-to-text is really slow (still not my main concern). It has the most recent version of Marshmallow (Android 6) installed.



EDIT 2: Occurs on Android 7 now as well. But I found out it was the Google App, not the phone or OS specifically. (see answer below)


Answer

Okay, over a year later I have finally figured out what is going on. My carrier apparently uses "MQTT protocol," which means they need the Cellular Data option on to send texts (however, they have their own app set up to make sure that sending texts doesn't count toward your monthly data allotment).



The problem is that when the Cellular Data option is turned on, the Google app thinks that it should have Internet connection even when it doesn't. In my case, I don't pay for any data but I have to keep the "Cellular Data" option always on, as previously mentioned. But this makes the Google app not recognize that the phone is offline, and so internally it doesn't switch over to its "offline mode" and that's why the Offline Commands don't work and it doesn't recognize speech. I tried turning off my Cellular Data (while not connected to wifi) and the offline features worked as expected.



This means that I am not able to use Google's offline features, though, unless I turn off Cellular Data. And when I turn that off I won't be able to receive texts. So I can't have both :(


Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes