Batch transcribe a folder of audio on a Mac.

Turn a folder of recordings into matching transcript files with a small shell loop. AFK's CLI takes one file at a time, so wrap each input in the loop; the same pattern gives an agent a clear handoff.

Make the loop do the batch work.

This is the complete pattern for a folder of M4A recordings. Each command writes its transcript to a matching TXT file:

$ for f in *.m4a; do
>   afk transcribe "$f" > "${f%.*}.txt"
> done
  1. Match the recordings.The *.m4a pattern finds the files in the current folder.
  2. Transcribe one source.The quoted path keeps spaces in a filename intact.
  3. Save the matching result.${f%.*}.txt changes the extension while keeping the base name.

Make the handoff easy for an agent.

AFK bundles an Agent Skill that explains quoting paths, keeping transcript output on stdout, keeping progress and errors on stderr, handling video, and separating local transcription from any later step.

Copy for your agent

Paste this into a coding agent that can run shell commands on your Mac, and put the folder's path on the last line.

Transcribe every recording in a folder with AFK, a Mac app that is also a command-line tool.

1. Find the command. Use `afk` if it is on PATH. Otherwise call /Applications/AFK.app/Contents/MacOS/AFK directly. Run it with --help to confirm it works.
2. AFK takes one file per command, so loop over the folder. For each audio file (m4a, wav, mp3, aiff, caf, flac) or video file (mp4, mov, m4v), run: afk transcribe "FILE" > "FILE-WITHOUT-EXTENSION.txt"
3. Run the files one at a time. Skip a file that already has a matching .txt so nothing is overwritten.
4. If a command exits with a non-zero status, note the file and what it printed on stderr, then carry on with the next file.
5. When the loop ends, list the transcripts you wrote and any files that failed.

Transcription runs on this Mac. Do not send the transcripts to an online service unless I ask.

The folder: 

Install explicitly

$ afk install-agent-skill

The skill is installed at ~/.agents/skills/afk-transcription. A different existing copy is not overwritten unless you deliberately use --force.

Keep streams clean

Transcript text goes to stdout. Model status and errors go to stderr, so an agent or shell can redirect the text without swallowing diagnostics.

Keep the workflow bounded

The installed skill points an agent to the CLI, its output streams, and the local transcription steps.

Questions

Is there a batch flag?

No. afk transcribe takes one file per command. A short shell loop covers a folder, and the loop on this page is the whole trick.

Do I need Terminal to transcribe a folder?

No. Drop all the files on the Transcribe screen and choose an output folder. AFK works through them one at a time and saves each transcript there.

Will a second run overwrite my transcripts?

In the app, no: a file with the same name is saved as name-2. In a shell loop, > replaces the file, so write to a new folder if you want to keep the old ones.

How does a script know a file failed?

By the exit code. 0 is a complete transcript, 1 means the transcription failed or part of the recording was skipped, and 2 means the command was written wrong.

Does it run several files at the same time?

No. One file at a time, in the order you give them.

Start with a folder and a loop.

The agents guide covers the installed skill, and the CLI reference owns flags and exit behavior. For video recordings, read the video-to-text use case.