Can I make Mac OS X "ping" when it recognizes the Speech Recognition keyword?
It pings when it recognizes a phrase, but that's a little different.
My speech recognition is working fine without a keyword, but fails
when I use a keyword, even if it's a short keyword like "Bob" or
"Hal".
If I can at least know when it's accepted the keyword, it would be helpful.
Have other people tried to use Speech Recognition on your machine and failed? The recognizer can, sometimes, have issues with certain accents. Use the OS X text-to-speech system to read out what you want to say (use Alex or one of the other normal-speech voices [i.e. not Zarvox]) and try to match its pronunciation exactly.
Related
How can I use OSX's speech-to-text tools programmatically? OSX has offline "enhanced dictation" which essentially means that somewhere on my computer is all the data required to turn audio into speech. I would like to invoke these capabilities from an executable.
I have seen some AppleScript files essentially do this, but I can't get them to work on OSX.
NSSpeechRecognizer is an API that provides access to the older "Speakable Items" functionality that's been around since before OS X (now called "Dictation Commands", and requiring Enhanced Dictation).
This is just a command interface, though — that is, you provide a list of commands, and it tells you when the user has spoken one of them. There's no public API for full speech-to-text dictation.
In OSX Mavericks, speech dictation is now included, and is very useful. I am trying to use the dictation capability to create my own digital life assistant, but I can't find how to use the recognition functionality to get the speech in an application rather than a text box.
I have looked into NSSpeechRecognizer, but that seems to be geared toward programming speakable commands with a pre-defined grammar rather than dictation. It doesn't matter what programming language I use, but Python or Java would be nice...
Thanks for your help!
You can use SFSpeechRecognizer (mirror) (requires macOS 10.15+): this is made for speech recognition.
Perform speech recognition on live or prerecorded audio, receive transcriptions, alternative interpretations, and confidence levels of the results.
Whereas as you have noted in the question NSSpeechRecognizer (mirror) indeed provides a “command and control” style of voice recognition system (the command phrases must be defined prior to listening, in contrast to a dictation system where the recognized text is unconstrained).
From https://developer.apple.com/videos/play/wwdc2019/256/ (mirror):
Another way is to directly use Mac Dictation, but as far as I know the only way is to rerdirect audio feeds, which isn't very neat, e.g. see http://www.showcasemarketing.com/ideablog/transcribe-mp3-audio-to-text-mac-os/ (mirror).
I am creating a native OS X application, and I was surprised at how difficult it is to find documentation on text-to-speech with native APIs. What would be the easiest way of having my application speak (using Alex's voice for example)?
Thanks!
What you call “text-to-speech” is also commonly abbreviated as TTS and alternatively called “speech synthesis”.
The Cocoa class NSSpeechSynthesizer is the API to use. The canonical sample code is CocoaSpeechSynthesisExample.
There also is a guide to “Speech Programming Topics” and a “Speech Synthesis Programming Guide” available.
Finally, there are lower level APIs available if you need access to stuff that is abstracted away for you by NSSpeechSynthesizer.
Look at this please NSSpeechRecognizer example
its a text to speech built in library for OS X .. NSSpeechRecognizer
A customer asked for a text conversion feature from traditional Chinese to simplified Chinese.
I did a little research and apparently it's the kind of thing that can be automated quite readily and Mac OS X even has a system wide service for doing this.. there seems to be something built into OS X to perform those changes, but I'm no expert at internationalization..
Does anybody know how to perform this miracle?
Best regards,
Frank
I think the functionality you requested exists inside an app that Apple shipped with OS X--I don't know of any built-in functionality.
If you are trying to implement conversion, it looks like wikimedia has some code that might do what you want, but you'll have to convert it from PHP:
http://svn.wikimedia.org/doc/classZhConverter.html
Also, it may not be just a matter of converting the characters, although that's most of it... there are also phrases that are different in mainland Chinese (simplified characters) and other places (traditional characters).
I'm developing an app for the Mac OS X that provides various system statistics. I have a little problem with the printer because I have never worked with it before. Is there any way to listen to the printer and count pages printed in color and in b&w?
Edit: I remember that I was using a Mac OS X kiosk machine once and it offered color and b&w prints priced per page, so there must be a way to do this. Also, I develop this app for my own needs and for practice so the solution doesn't have to be universal.
I'm pretty sure access to this information is specific to individual printer models. I don't believe there's a system API that will help you here as it would require querying individual printer drivers or utilities.
The Core Printing Reference which is the documentation for the Mac OS X printing API doesn't appear to contain any calls that would allow you to extract this information from a printer.