cd /news/ai-tools/how-i-built-a-safari-safe-iphone-voi… · home › topics › ai-tools › article
[ARTICLE · art-182908] src=dev.to ↗ pub= topic=ai-tools verified=true sentiment=↑ positive

How I Built a Safari-Safe iPhone Voice Memo (.m4a) Transcriber with Presigned R2 Uploads, Hybrid Diarization & Zero-Upload Subtitle Tools

An independent developer built TranscribeVoiceMemo.com, a web workspace for transcribing long iPhone .m4a voice memos, and open-sourced a companion Python toolkit under the MIT license. The build avoids client-side decoding that crashed mobile Safari on a 75-minute file, instead parsing ISO BMFF atoms with standard-library Python to read duration and routing uploads through presigned R2 PUT URLs. It also adds hybrid speaker diarization normalized into a canonical utterance array and grounded prompt modes for generating meeting notes.

recommendation

Avoid AudioContext.decodeAudioData for long .m4a files on mobile Safari; read duration from the mvhd atom and upload directly to object storage with presigned URLs.

more in playbook: Running AI in production
read5 min views3 publishedDec 6, 2026

If you have ever tried to build a web app that transcribes iPhone Voice Memos (.m4a), you quickly run into a wall of edge cases that tutorial Whisper demos completely gloss over:

.m4a into PCM with AudioContext.decodeAudioData (a 2-hour 48 kHz float32 buffer eats ~1.4 GB of RAM).$20/month subscriptions Here are the engineering decisions and open-source utilities behind TranscribeVoiceMemo.com, an independent web workspace built for long iPhone .m4a voice memos, interviews, and podcasts (up to 250 MB / 3 hours per file, 24-hour raw audio auto-delete, and pay-as-you-go packs).

All reference Python utilities, .srt/.vtt formatters, and grounded AI prompt templates discussed below are MIT-licensed on GitHub at FujieW/voice-memo-transcript-toolkit and documented in the Voice Memo & Subtitle Transcription Handbook.

Apple's Voice Memos app saves audio inside an ISO BMFF (.m4a) container using one of two settings in iOS Settings → Voice Memos → Audio Quality:

iOS Audio Quality Internal Codec Typical Bitrate 60-Min File 3-Hour File
Compressed (default) AAC-LC (mono, 48 kHz) ~64 kbps ~29 MB ~86 MB
Lossless Apple Lossless (ALAC) ~500–800 kbps ~225–360 MB ~675 MB+

In our first prototype, reading duration client-side via AudioContext.decodeAudioData() worked fine on desktop Chrome for 3-minute test clips—and immediately killed mobile Safari on a 75-minute client interview.

Instead of decoding audio in browser RAM or proxying uploads through Next.js API routes:

PUT URL.mp3 first (documented step-by-step on our ffmpeg or ffprobe to inspect ftyp and moov/mvhd atoms takes ~30 lines of standard-library Python (from tools/m4a_inspector.py in our toolkit):

import struct
from typing import BinaryIO

def read_atoms(f: BinaryIO, start: int, end: int) -> list[tuple[str, int, int]]:
    atoms = []
    pos = start
    while pos + 8 <= end:
        f.seek(pos)
        header = f.read(8)
        if len(header) < 8:
            break
        size, atom_type_bytes = struct.unpack(">I4s", header)
        header_len = 8
        if size == 1:  # 64-bit extended atom size
            size = struct.unpack(">Q", f.read(8))[0]
            header_len = 16
        elif size == 0:
            size = end - pos
        if size < header_len or pos + size > end:
            break
        atoms.append((atom_type_bytes.decode("latin-1", errors="replace"),
                      pos + header_len, pos + size))
        pos += size
    return atoms

Once moov -> mvhd is located, dividing duration / timescale gives exact playback seconds with zero native binary dependencies.

For multi-speaker calls—like journalists, UX researchers, and recruiters running 1-to-3-hour sessions on our Interview Transcription and MP3 to Text flows—losing Speaker A / Speaker B labels during a transient API timeout ruins the output.

Our routing splits workloads by intent rather than forcing one model for everything:

All engines normalize into one canonical utterance array:

{
  "utterances": [
    {
      "speaker": "Speaker A",
      "start": 0.42,
      "end": 7.91,
      "text": "Thanks everyone for hopping on. Let's lock in the Voice Memos upload workflow."
    }
  ]
}

Generic "summarize this transcript" prompts love inventing action items and owners that were never spoken. For Voice Memo to Notes AI, we decoupled transcription from structured post-processing using four strict, grounded prompt modes (open-sourced in prompts/meeting-notes-prompts.json):

Mode Output Structure Grounding Constraint
meeting_notes Executive TL;DR, Key Takeaways ( [MM:SS] ), Decisions, Action Items Strictly facts spoken in transcript
clean_transcript Filler-free paragraphs with preserved speaker labels & timestamps No summarizing or paraphrasing away details
follow_up_email Subject line, recap, and owner-tagged next steps Exact dates, metrics, and language match
study_notes Topic headings, key definitions, and 5–8 Q&A review cards Derived strictly from spoken lecture

.srt / .vtt Generation & Zero-Upload Browser Utilities When exporting subtitles for Premiere Pro, CapCut, DaVinci Resolve, or YouTube via Audio to SRT Converter, raw ASR segments often produce 180-character single-line blocks that overflow video frames.

Our deterministic formatter (tools/transcript_to_srt.py) enforces three broadcast rules:

end > start) so quick interjections never flicker. 00:01:12,450) and WebVTT ( WEBVTT header and dot milliseconds (00:01:12.450):

def format_timestamp(seconds: float, separator: str = ",") -> str:
    total_ms = max(0, int(round(seconds * 1000)))
    hours, rem = divmod(total_ms, 3_600_000)
    minutes, rem = divmod(rem, 60_000)
    secs, ms = divmod(rem, 1_000)
    return f"{hours:02d}:{minutes:02d}:{secs:02d}{separator}{ms:03d}"

While building this pipeline, we noticed a large chunk of creators and meeting teams already have an .srt or Zoom .vtt file and just need fast format cleanup—no AI backend required. So we shipped 5 pure-JavaScript, zero-upload utilities under Free Browser Subtitle & Transcript Tools:

[MM:SS] transcripts locally.+/- audio offsets and 23.976 / 24 / 25 / 29.97 FPS frame-rate drift instantaneously in browser. No single tool fits every workflow. Here is how the four common approaches compare:

Approach Strengths Trade-Offs
Apple iOS Built-in Voice Memos Free, native on iPhone/Mac No Speaker A/B labels, no structured meeting notes, no .srt /.docx export, Apple-only
Local Whisper / MacWhisper 100% offline, great privacy on Apple Silicon Requires desktop install & GPU/M-series RAM; slow on older laptops; no browser workflow on iPhone
Subscription Cloud Tools (Otter / Notta / TurboScribe) Strong live meeting bots & team workspaces Monthly recurring fee ( $10–$30/mo ) even if you only transcribe 1–2 long recordings a month
Direct-Upload Pay-As-You-Go (TranscribeVoiceMemo) Safari-safe up to 250 MB / 3h, Speaker A/B at 0% surcharge, 24h auto-delete, packs from $4.90 valid 365 days Async file upload (not a live Zoom meeting bot); requires internet for AI transcription

To make privacy verifiable rather than marketing copy, our Security & 24h Auto-Delete architecture enforces:

If you have hit other weird .m4a container quirks (especially Apple Lossless ALAC or multi-track QuickTime .mov exports) or want another client-side caption utility added to /tools, drop a comment below—happy to share benchmarks or add it to the open-source toolkit.

── more in #ai-tools 4 stories · sorted by recency
── more on @transcribevoicememo.com 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/how-i-built-a-safari…] indexed:0 read:5min 2026-12-06 · —