10

In Mountain Lion, Mac OS X can use its dictation/voice recognition to turn your speaking into text.

Suppose I have an audio file of my voice speaking. Is there a way to use this dictation ability to turn that audio file into a text file?

I suppose the brute force solution would be to plug headphones into the audio port and hold them up to the microphone. Is there a more software-based solution more analogous to Unix pipes?

2
  • This may not work so well as the voice dictation feature has a cut off that seems to be around 30 seconds. I've had much better success with short dictation rather than long (with long being in the 20 seconds range).
    – bmike
    May 29, 2013 at 14:33
  • I can break it into ten to twenty second long chunks if need be.
    – Daniel
    May 29, 2013 at 14:57

5 Answers 5

5

You can install Soundflower. It's a great utility that creates virtual input and output devices. So you could route QuickTime player, for example, as the input for the dictation. http://cycling74.com/soundflower-landing-page/

2
  • Soundflower can feed into other voice recognition programs too, e.g., Google Docs under the Chrome browser has a "Voice typing" feature.
    – Paul Price
    Aug 27, 2018 at 3:25
  • Using this method I would need to wait for the duration of the audio file for the dictation to be done. Is there a faster method without using Apple's SDKs?
    – Teddy C
    Apr 19, 2022 at 3:31
3

On Mavericks, you can use the dictation on an audio file if you use Soundflower plus an audio player which allows you to choose the sound output device, such as Audacity. This way you won't be affected by Mavericks muting the system sound output during dictation, because the output will go into Soundflower before it gets muted, and you set the dictation to receive only from Soundflower. This also has the advantage of other sounds that may occur (such as a reminder notification sound) not causing interference. It will also work better than previous Mac OS X versions because the enhanced dictation in Mavericks (which needs to be enabled first) does not cut off the dictation after 30 seconds.

This webpage provides the details on how to use the Mac OS X 10.9 dictation on an audio file: http://www.leveluplunch.com/blog/2013/12/30/convert-recorded-audio-text-using-osx-dictation-audacity-soundflower/

3

In Yosemite, Whenever we try to use the dictation feature in OSX it mutes other sounds and active only the build-in microfone. You need to set some hidden preferences to make this work. Open Terminal and enter the two commands below:

defaults write com.apple.SpeechRecognitionCore AllowAudioDucking -bool NO

defaults write com.apple.speech.recognition.AppleSpeechRecognition.prefs DictationIMAllowAudioDucking -bool NO

After doing this turn off dictation in Systems Preferences, wait a few seconds and then re-enable it. You should now be able to dictate while audio is playing. I’ve only tried this while using a headset/headphones, it’s probably not advisable without. :)

To restore your system to it’s virginal state, run these commands in Terminal and then restart dictation:

defaults delete com.apple.SpeechRecognitionCore AllowAudioDucking

defaults delete com.apple.speech.recognition.AppleSpeechRecognition.prefs DictationIMAllowAudioDucking
3

As of Catalina/Big Sur, the built-in Dictation feature will no longer accept audio from any virtual microphone or system outputted audio. Oddly it often seems to ignore the microphone selected in dictation preferences and just using a different one.

But there's a solution! Just use the Voice Control feature instead of the dictation feature. This happens all offline so the quality is somewhat worse and it's not as consistent as the Dictation feature. This post touches on that topic: https://machow2.com/dictate-offline-catalina/

Reading between the lines, it seems like Apple is trying to prevent their fancy cloud-based speech to text service from being use for automated transcription... Similar to how built in macOS text-to-speech functionality (say) refuses won't output using the high quality Siri voices.

1

If you have Rogue Amoeba's Loopback software, you can create a 'virtual dictation' device and play back audio through it to the Dictation service.

They have a complete guide here, but here's the rundown:

  1. Launch Loopback and create a new 'Virtual Device' named something like Transcription.
  2. Add your playback app as a source (e.g. Quicktime, Music, Podcasts, whatever).
  3. In the Keyboard System Preference pane, under Dictation, select your new Transcription virtual device under the microphone as the audio source.
  4. Open an app that supports dictation like TextEdit.
  5. Start playing audio from the playback app
  6. In TextEdit, click Edit > Start Dictation...

I just tested on macOS Monterey and it seemed to work pretty well for my spoken word files.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .