Hi everyone
I tried the speechRecognition plugin in Beta version
https://ionicframework.com/docs/native/speech-recognition/
I followed the doc to see how it works, and I got this in logcat :
04-20 18:21:51.917 D/SpeechRecognition( 3558): execute() action requestPermission
04-20 18:21:51.919 D/SpeechRecognition( 3558): execute() action getSupportedLanguages
04-20 18:21:51.923 D/SystemWebChromeClient( 3558): file:///android_asset/www/build/main.js: Line 57357 : Granted
04-20 18:21:51.923 I/chromium( 3558): [INFO:CONSOLE(57357)] “Granted”, source: file:///android_asset/www/build/main.js (57357)
04-20 18:21:51.924 D/SystemWebChromeClient( 3558): file:///android_asset/www/build/main.js: Line 57359 : Could not get list of languages
04-20 18:21:51.924 I/chromium( 3558): [INFO:CONSOLE(57359)] “Could not get list of languages”, source: file:///android_asset/www/build/main.js (57359)
I tried on android 7 with a virtual device running with genymotion
Simple code i call on a button click :
startReco()
{
this.speechRecognition.requestPermission() .then( () => console.log('Granted'), () => console.log('Denied') ) this.speechRecognition.getSupportedLanguages() .then( (languages: Array<string>) => console.log(languages), (error) => console.log(error) ) /* let options = {language :"en-US",matches:5,prompt:"",showPopup:true,showPartial :false}; this.speechRecognition.startListening(options).subscribe( (matches: Array<string>) => console.log(matches), (onerror) => console.log('error:', onerror) )*/ }
The request for ask permission works, but not getSupportedLanguages
My ionic info :
ordova CLI: 6.5.0
Ionic Framework Version: 3.0.1
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.3.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v7.7.1
Xcode version: Not installed
Thanks for any help