sveinbjornt / hear

Command line speech recognition and transcription for macOS
https://sveinbjorn.org/hear
BSD 3-Clause "New" or "Revised" License
405 stars 25 forks source link

Error: On-device recognition is not supported for en-US #20

Open al-indigo opened 1 year ago

al-indigo commented 1 year ago

I have Mac Mini (M1), MacOS Monterey 12.5.1 (21G83). After attempt to launch hear I see the following:

./hear -s
ar-SA
ca-ES
cs-CZ
da-DK
de-AT
de-CH
de-DE
el-GR
en-AE
en-AU
en-CA
en-GB
en-ID
en-IE
en-IN
en-NZ
en-PH
en-SA
en-SG
en-US
en-ZA
es-419
es-CL
es-CO
es-ES
es-MX
es-US
fi-FI
fr-BE
fr-CA
fr-CH
fr-FR
he-IL
hi-IN
hi-IN-translit
hi-Latn
hr-HR
hu-HU
id-ID
it-CH
it-IT
ja-JP
ko-KR
ms-MY
nb-NO
nl-BE
nl-NL
pl-PL
pt-BR
pt-PT
ro-RO
ru-RU
sk-SK
sv-SE
th-TH
tr-TR
uk-UA
vi-VN
wuu-CN
yue-CN
zh-CN
zh-HK
zh-TW

But nevertheless I can not transcribe any audio with the following error:

./hear  -d -i ./test.m4a        
2023-03-09 19:20:01.767 hear[21203:2358806] Required assets are not available for Locale:en-US
Error: On-device recognition is not supported for en-US

Here are the settings of dictation (see the screenshot).

What am I missing? Screenshot 2023-03-09 at 19 20 28

pbmayu commented 1 year ago

I had the same error. Once i wrapped the filenames in double quotes it worked. e.g hear -d -i "filename.mp3" > "output.txt"

jsonsmth commented 1 year ago

Same here. Double quotes didn't work for me:

hear -l en-US -i "./tmp/test.mp3" works.

hear -l en-US -d -i "./tmp/test.mp3" does not:

2023-04-09 08:56:37.217 hear[82015:1282124] Required assets are not available for Locale:en-US Error: On-device recognition is not supported for locale 'en-US'

jsonsmth commented 1 year ago

I was able to resolve my issue by enabling dictation and waiting a few minutes:

CleanShot 2023-04-09 at 09 08 18

sveinbjornt commented 1 year ago

This is not a problem with "hear" per se, but with how macOS fetches locally needed resources for speech recognition.

al-indigo commented 1 year ago
  1. Quotes: didn't help
  2. Dictation is on (you can see it on the screenshot in the first message)
sveinbjornt commented 1 year ago

@al-indigo Can you use otherwise successfully use dictation in the OS?

swoodford-clear commented 1 year ago

I had this issue on M1 Macbook Pro, a reboot seemed to fix it

al-indigo commented 1 year ago

@al-indigo Can you use otherwise successfully use dictation in the OS?

Yes, this Mac Mini M1 successfully works on dictation using both Logitech web-camera microphone and Sony WH-1000XM4. Maybe I can generate some diagnostics logs somehow?

michael-2956 commented 1 year ago

You can fix it by first running hear without the -d flag on, so that MacOS fetches all the needed data, and then you can use your usual command

kepol commented 1 year ago

Having the same issue on M1+Sonoma and tried:

  1. Quotes
  2. Enabling dictation
  3. Running without -d and then with -d
  4. Rebooting

but not of these worked for me.

quinnburton commented 1 year ago

I was able to get this to work in Ventura 13.5.1 by going to Finder > Edit > Start Dictation.

Once Dictation was running, I could then run the hear -d -i filename.mp3 > output.txt command in the terminal successfully

hegish commented 1 year ago

Having the same issue on M1+Sonoma and tried:

  1. Quotes
  2. Enabling dictation
  3. Running without -d and then with -d
  4. Rebooting

but not of these worked for me.

Worked for me this way. Make sure to use a rather short snippet for the call without -d, so it can actually succeed. FWIW I also enabled dictation in the keyboard settings.

fluxpiada commented 7 months ago

it really works. you need to download the proper dictation language to your hd first (config > Translation Languages); and then add -l en-AU for Australian English and hear will choose that as dictation language for transcription. don't forget to add '-p' for punctuation!

khanakia commented 5 months ago

@fluxpiada how to download the languages ?