Closed Ban11gers closed 3 years ago
Thanks for reporting, I haven't seen that problem before. It sounds like it is hitting a problem while retrieving or encoding the list of locales on the device. Could you let me know what languages are installed on that device? I'm wondering if I'm having a problem with a Unicode or just unexpected character in a device name.
Hi @sowens-csd , i have same issue, i have a samsung s8. Where i can see what languages are installed?
Ohh just find it, settings, general, languages, language, Portuguese and English
Thanks, any special characters in the language name? Anything with accents or that looks like Unicode? I'm just trying to figure out what I'm doing wrong encoding the names.
Nop, i don't see anything that could break local names... how can a retrieve all unicodes?
Here is a dump of all locales from my device
ar
ar-AE
ar-IL
as
as-IN
az
az-AZ
be
be-BY
bg
bg-BG
bn
bn-BD
bn-IN
bs
bs-BA
ca
ca-ES
cs
cs-CZ
da
da-DK
de
de-AT
de-CH
de-DE
el
el-GR
en
en-AU
en-CA
en-GB
en-IE
en-NZ
en-PH
en-US
en-ZA
en-ZG
es
es-ES
es-US
et
et-EE
eu
eu-ES
fa
fa-IR
fi
fi-FI
fil
fil-PH
fr
fr-BE
fr-CA
fr-CH
fr-FR
ga
ga-IE
gl
gl-ES
gu
gu-IN
hi
hi-IN
hr
hr-HR
hu
hu-HU
hy
hy-AM
in
in-ID
is
is-IS
it
it-IT
iw
iw-IL
ja
ja-JP
ka
ka-GE
kk
kk-KZ
km
km-KH
kn
kn-IN
ko
ko-KR
ky
ky-KG
lo
lo-LA
lt
lt-LT
lv
lv-LV
mk
mk-MK
ml
ml-IN
mn
mn-MN
mr
mr-IN
ms
ms-MY
my
my-MM
my-ZG
nb
nb-NO
ne
ne-NP
nl
nl-BE
nl-NL
or
or-IN
pa
pa-IN
pl
pl-PL
pl-SP
pt
pt-BR
pt-PT
ro
ro-RO
ru
ru-RU
si
si-LK
sk
sk-SK
sl
sl-SI
sq
sq-AL
sr
sr-RS
sv
sv-SE
ta
ta-IN
te
te-IN
tg
tg-TJ
th
th-TH
tk
tk-TM
tr
tr-TR
uk
uk-UA
ur
ur-PK
uz
uz-UZ
vi
vi-VN
zh-CN
zh-HK
zh-TW
I just committed a potential fix for this issue. There are two aspects to the fix. The first is some extra debug logging around building the language list. The second is a change so that even if the language list is not available the locales
method will still return a result with the default language on the device. The previous code didn't return a result in that case which makes me suspect if that is what's happening on your devices. The logging will show whether that is true. If you could try this on a device that is currently failing and let me know what happens that would be great, thanks!
The new log statements only show with debugLogging: true
on initialize
they are:
If languages are found:
D/SpeechToTextPlugin: Received extra language broadcast
D/SpeechToTextPlugin: Extra supported languages
If languages are not found:
D/SpeechToTextPlugin: Received extra language broadcast
D/SpeechToTextPlugin: No extra supported languages
Currently not seeing any change
pubspec.lock:
speech_to_text:
dependency: "direct main"
description:
name: speech_to_text
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
Here is the log:
Launching lib\main.dart on SM G955F in debug mode...
Running Gradle task 'assembleDebug'...
√ Built build\app\outputs\flutter-apk\app-debug.apk.
Waiting for SM G955F to report its views...
Debug service listening on ws://127.0.0.1:59050/bO_rYuyUgRs=/ws
Syncing files to device SM G955F...
D/ViewRootImpl@2f0ab62[MainActivity](22599): ViewPostIme pointer 0
D/ViewRootImpl@2f0ab62[MainActivity](22599): ViewPostIme pointer 1
D/SpeechToTextPlugin(22599): Start initialize
D/SpeechToTextPlugin(22599): Checked permission
D/SpeechToTextPlugin(22599): has permission, completing
D/SpeechToTextPlugin(22599): completeInitialize
D/SpeechToTextPlugin(22599): Testing recognition availability
D/SpeechToTextPlugin(22599): Creating recognizer
D/SpeechToTextPlugin(22599): Setting listener
D/SpeechToTextPlugin(22599): before setup intent
D/SpeechToTextPlugin(22599): setupRecognizerIntent
D/SpeechToTextPlugin(22599): after setup intent
D/SpeechToTextPlugin(22599): sending result
D/SpeechToTextPlugin(22599): leaving complete
D/SpeechToTextPlugin(22599): leaving initializeIfPermitted
D/SpeechToTextPlugin(22599): In RecognizerIntent apply
D/SpeechToTextPlugin(22599): put model
D/SpeechToTextPlugin(22599): put package
D/SpeechToTextPlugin(22599): put partial
D/ViewRootImpl@2f0ab62[MainActivity](22599): ViewPostIme pointer 0
D/ViewRootImpl@2f0ab62[MainActivity](22599): ViewPostIme pointer 1
I just want to make sure of a few things because that log is surprising:
locales
method in the example app.For reference the pubspec dependency would look like this:
speech_to_text:
git: https://github.com/csdcorp/speech_to_text.git
Hi @sowens-csd , I have a Samsung S7, Android 8.0.0 and also ran into this issue. After pointing to this package, it works correctly. After launching the example code with the locales initialization code, the dropdown now shows up and includes the only language I have on. English (United States)
With debugLogging on, I see:
D/SpeechToTextPlugin(11047): Received extra language broadcast
D/SpeechToTextPlugin(11047): No extra supported languages
To connect to this package instead of the pub.dev I added to dependencies like this to link to this package.
speech_to_text:
git:
url: https://github.com/csdcorp/speech_to_text.git
path: speech_to_text
Thanks a lot for letting me know, I appreciate it.
I'll probably release this version soon with this fix and a few others I've been working.
Confirming no issue on my device with the current changes you've made.
Thanks for that
This is resolved in the 3.1.0 release that is live now.
I was trying to run example code from speech_to_text pub.dev on my physical device, and found tapping Initialise would not enable the start button. So doing some logging at certain lines led me to find that speech.locales() was not completing and once I commented out
I was able to record my voice.
here is the debug log when above code is not commented out:
On an Android emulator list gets populated but no way to record voice.