sveinbjornt / hear

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

Usage of the -l flag #2

Closed iNerdier closed 1 year ago

iNerdier commented 2 years ago

I cannot for the life of me get the -l flag to work.

Running an Intel build of 12.4 any calls to a language other than the default results in:

No file at path en-GB

or en-IE or sk-SK etc. I assume that it either can’t find the correct path to a language pack or in some way it the OS needs to be informed to download that specific language pack?

Dictation in other applications (e.g. text edit) are working as expected in a system preferences selected language.

Is there something I’m missing about how to use other language profiles?

sveinbjornt commented 2 years ago

Thanks for the feedback, I'll have to take a look t that!

glangford commented 2 years ago

@iNerdier I am able to to use pt-PT which is not my system language.

Have you gone to System Preferences/Keyboard/Dictation, and used Customize to add other languages?

glangford commented 2 years ago

For some locales, the speech recognizer requires an active Internet connection to communicate with Apple's servers. If the speech recognizer is currently unable to process requests, isAvailable returns false. Speech recognition supports the same locales that are supported by the keyboard's dictation feature.

fyi, from https://developer.apple.com/documentation/speech/sfspeechrecognizer/1649889-supportedlocales

So I suggest adding the language per my previous comment and making sure you have an internet connection.

iNerdier commented 2 years ago

Yes, and my system default language is en-GB which is not being recognised. This is all with an active internet connection and no firewall (little snitch etc.).

KorayUlusan commented 1 year ago

First open system preferences > keyboard > dictation.

Screen Shot 2022-09-19 at 12 02 37 PM

Then lanuage > customize... Then select the language you want. Select OK. It will say

Support for processing LANGUAGE_HERE on your Mac will download later
when an Internet connection is available.

Connect to internet. Then open a text file and start dictating. Select the language you want and speak in that language for some time.

System preferences will say downloading LANGUAGE.

Once finished you're good to go.

iNerdier commented 1 year ago

Again, this does nothing to change any errors. As far as I can tell local downloads are not happening in 12.5.1, I just tried this with English (Australian) and dictation worked fine in text edit but was not recognised from the command line with the flag set to en-AU.

RobBW commented 1 year ago

This (https://github.com/iNerdier) experience is consistent with mine in trying to get English(New Zealand) working. Maybe its our accents! I am using 12.5.1. & Dictation works perfectly in TextEdit and this comment box. I'm about to upgrade to 12.6 and will report back