Menu

How Banlin records on Apple Watch and transcribes offline on iPhone
📰

How Banlin records on Apple Watch and transcribes offline on iPhone

DEV Community: swift·Banlin·about 5 hours ago
#cS5n4tOl
#devtoswift#devto#dev#watch#seconds
Long article (550 words) — no AI summary yet.
Reading 0:00
15s threshold

In one of Banlin’s regression tests, 62 seconds have passed on the watch, but the right place to start playback is second 60 of the audio file. Pass 62 straight to the player and someone tapping a transcript starts listening two seconds late.

Banlin is a voice diary. You record on Apple Watch, and the paired iPhone transcribes the recording offline once it has the speech model for your language. Two details make tap-to-replay work across those devices. The phone has to know it has the whole recording, and it has to know where the microphone missed time.

When can the watch delete its copy?

The watch writes 16 kHz mono AAC audio in segments. Each AAC packet has its own ADTS header. Our recovery test cuts a segment in the middle of a packet, trims the incomplete tail, and opens the remaining audio. That gives us a way to recover the complete packets already written if recording stops unexpectedly.

When you finish recording, the watch queues the files through Watch Connectivity.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.