Repository Public License
1<!--2ORIX Audio3File: README.md4Author: Simon-Pierre Boucher5Contact: contact@spboucher.ai6-->78<p align="center"><img src="docs/assets/orix-audio-icon-256.png" width="148" height="148" alt="ORIX Audio icon"></p>910<h1 align="center">ORIX Audio</h1>1112<p align="center"><strong>Hear Everything. Understand More.</strong></p>1314<p align="center">15A native audio recorder, analysis laboratory and meeting notebook for iPhone and iPad.<br>16Every waveform, spectrum and number on screen is computed from the audio itself. Nothing leaves the device.17</p>1819<p align="center">20<img src="docs/assets/badges/ios.svg" alt="iOS 26+">21<img src="docs/assets/badges/ipados.svg" alt="iPadOS adaptive">22<img src="docs/assets/badges/swift.svg" alt="Swift 6">23<img src="docs/assets/badges/swiftui.svg" alt="SwiftUI">24<img src="docs/assets/badges/dsp.svg" alt="DSP with Accelerate and vDSP">25<img src="docs/assets/badges/visualization.svg" alt="Visualization with Canvas and Core Graphics"><br>26<img src="docs/assets/badges/speech.svg" alt="On-device speech">27<img src="docs/assets/badges/foundation-models.svg" alt="Foundation Models where supported">28<img src="docs/assets/badges/privacy.svg" alt="Privacy first">29<img src="docs/assets/badges/offline.svg" alt="Core offline">30<img src="docs/assets/badges/account.svg" alt="No account required"><br>31<img src="docs/assets/badges/localized.svg" alt="English and French-Canadian">32<img src="docs/assets/badges/tests.svg" alt="83 core, 21 app and 9 UI tests">33<img src="docs/assets/badges/testflight.svg" alt="TestFlight: 1.0.0 (1) in internal testing">34</p>3536> **Status, 2026-11-20.** The app is implemented and passes its test suites in the iOS 26.5 simulator and on macOS 27.37> **No physical iPhone or iPad was available**, so everything that depends on real hardware — locked-screen recording,38> the Live Activity, real microphones, route changes, phone-call interruptions, battery use, on-device speech and39> Foundation Models on iOS — is implemented against Apple's documented APIs but **not yet validated on a device**.40> See [Release Status](#31-release-status) and [Known Limitations](#32-known-limitations).4142<table>43<tr>44<td width="25%"><img src="docs/screenshots/01-recording.png" alt="Recording screen with live waveform, spectrum and meters"></td>45<td width="25%"><img src="docs/screenshots/03-spectrogram.png" alt="Spectrogram of a recording"></td>46<td width="25%"><img src="docs/screenshots/05-analysis.png" alt="Analysis dashboard"></td>47<td width="25%"><img src="docs/screenshots/07-meeting-notes.png" alt="Meeting notes generated on-device"></td>48</tr>49<tr>50<td align="center"><sub>Record</sub></td><td align="center"><sub>Spectrogram</sub></td><td align="center"><sub>Analysis</sub></td><td align="center"><sub>Meeting notes</sub></td>51</tr>52</table>5354### Highlights5556- **A recorder built around not losing audio.** The capture master is an append-only file that is valid after every write; an interrupted session is offered for recovery at the next launch.57- **Frequency-coloured waveforms that are measurements.** Each bar is coloured from an FFT of that moment, split into seven bands.58- **A spectrum analyzer with honest units.** Amplitude, power and power spectral density are three different scalings, each labelled.59- **A zoomable spectrogram for long files**, computed in tiles so a multi-hour recording is never loaded whole.60- **A measurement laboratory**: peak, RMS, crest factor, clipping, ITU-R BS.1770-4 loudness, loudness range, true peak, spectral descriptors, speech-activity estimates.61- **On-device transcription** in the languages the system reports, with search, editing and subtitle export.62- **Meeting notes grounded in the transcript**: every point links to the line it came from; points that can't be traced are shown apart.63- **A non-destructive editor** with undo, an enhancement chain, and export to WAV, AIFF, CAF, Apple Lossless and AAC.64- **No account, no analytics, no uploads.** English and French-Canadian.6566---6768## Contents69701. [Overview](#1-overview) · 2. [ORIX Philosophy](#2-orix-philosophy) · 3. [Application Preview](#3-application-preview) · 4. [Recording](#4-recording) · 5. [Background Recording](#5-background-recording) · 6. [Multicolor Waveforms](#6-multicolor-waveforms) · 7. [Spectrum Analyzer](#7-spectrum-analyzer) · 8. [Spectrogram](#8-spectrogram) · 9. [Audio Analysis](#9-audio-analysis) · 10. [Transcription](#10-transcription) · 11. [Foundation Models Intelligence](#11-foundation-models-intelligence) · 12. [Meeting Studio](#12-meeting-studio) · 13. [Audio and Video Import](#13-audio-and-video-import) · 14. [Audio Editing](#14-audio-editing) · 15. [Playback](#15-playback) · 16. [Local Library](#16-local-library) · 17. [ORIX Actions](#17-orix-actions) · 18. [Export](#18-export) · 19. [Audio Architecture](#19-audio-architecture) · 20. [DSP Methodology](#20-dsp-methodology) · 21. [Technology Stack](#21-technology-stack) · 22. [Project Structure](#22-project-structure) · 23. [Installation](#23-installation) · 24. [Build Instructions](#24-build-instructions) · 25. [Testing](#25-testing) · 26. [Performance](#26-performance) · 27. [Privacy](#27-privacy) · 28. [Accessibility](#28-accessibility) · 29. [Localization](#29-localization) · 30. [Roadmap](#30-roadmap) · 31. [Release Status](#31-release-status) · 32. [Known Limitations](#32-known-limitations) · 33. [ORIX Ecosystem](#33-orix-ecosystem) · 34. [License](#34-license)7172---7374## 1. Overview7576ORIX Audio is one app for the whole life of a recording: capture it, look at it, measure it, transcribe it, summarise it, edit it and export it.7778| | |79|---|---|80| Platforms | iOS and iPadOS 26.0 or later, one universal binary |81| Language | Swift 6 (strict concurrency), SwiftUI |82| Size of the code base | about 11 900 lines of Swift, tests included |83| Third-party dependencies | none |84| Network use by the app | none (iOS may download a speech model when the user asks for it) |85| Bundle identifier | `ai.spboucher.orix.audio` |8687The repository has two halves. `Core/` is a Swift package, **ORIXAudioCore**, that holds everything with no user interface: signal processing, analysis, the capture file writer, the edit model, encoders, exporters, the transcription and notes engines. It builds and tests on macOS, which is where the reference-signal validation runs. `ORIXAudio/` is the SwiftUI app that drives it.8889## 2. ORIX Philosophy9091ORIX apps are small, exact tools. Three rules shape this one:92931. **Nothing decorative pretends to be data.** There are no simulated waveforms and no animated placeholders. When no audio is flowing, the plot is a flat line and says so.942. **A number carries its unit and its limits.** Levels are dBFS, relative to digital full scale — never presented as sound pressure. Estimates are labelled as estimates.953. **A feature that can't be honoured isn't offered.** There is no MP3 export because iOS has no MP3 encoder; no automatic speaker labels because Apple provides no on-device diarization; no cloud fallback for transcription because the audio would leave the device.9697## 3. Application Preview9899All images are captures of the running app in the iOS 26.5 simulator, produced by [`Scripts/screenshots.sh`](Scripts/screenshots.sh). The simulator has no usable microphone, so the recorder was fed from an audio file through a debug-only input that goes through the real capture pipeline. The transcript and notes shown were produced by the same engines running on a Mac and loaded for display, because the simulator cannot run Foundation Models. Details in [Release Status](#31-release-status).100101<table>102<tr>103<td width="25%"><img src="docs/screenshots/02-library.png" alt="Library"></td>104<td width="25%"><img src="docs/screenshots/04-spectrum.png" alt="Spectrum analyzer at the playhead"></td>105<td width="25%"><img src="docs/screenshots/06-transcript.png" alt="Transcript synced to playback"></td>106<td width="25%"><img src="docs/screenshots/08-editor.png" alt="Audio editor"></td>107</tr>108<tr><td align="center"><sub>Library</sub></td><td align="center"><sub>Spectrum</sub></td><td align="center"><sub>Transcript</sub></td><td align="center"><sub>Editor</sub></td></tr>109<tr>110<td><img src="docs/screenshots/09-actions.png" alt="ORIX Actions workflows"></td>111<td><img src="docs/screenshots/10-french.png" alt="French-Canadian interface with French notes"></td>112<td><img src="docs/screenshots/11-light-mode.png" alt="Light appearance"></td>113<td></td>114</tr>115<tr><td align="center"><sub>Actions</sub></td><td align="center"><sub>Français (Canada)</sub></td><td align="center"><sub>Light appearance</sub></td><td></td></tr>116</table>117118<table>119<tr>120<td width="50%"><img src="docs/screenshots/12-ipad-workspace.png" alt="iPad workspace: waveform, spectrogram, spectrum and analysis side by side"></td>121<td width="50%"><img src="docs/screenshots/13-ipad-recording.png" alt="iPad recording screen"></td>122</tr>123<tr><td align="center"><sub>iPad workspace</sub></td><td align="center"><sub>iPad recording</sub></td></tr>124</table>125126## 4. Recording127128Start, pause, resume, stop, add markers (renameable while recording), title and participants. The screen shows the elapsed time to a tenth of a second, the real capture format, the input in use, the bytes written, RMS and peak meters with peak hold and a clip lamp, and momentary loudness.129130**Presets.** The sample rate and the number of channels always follow what the active input delivers; the app shows the real values once recording starts and never assumes 96 kHz or stereo.131132| Preset | Saved file | Codec | Channels | Sample rate | Lossy? |133|---|---|---|---|---|---|134| Voice | `.m4a` | AAC-LC, 64 kbps | mono | 24 kHz (resampled when the input is higher) | yes |135| Meeting | `.m4a` | AAC-LC, 96 kbps | mono | input rate | yes |136| Lecture | `.m4a` | AAC-LC, 80 kbps | mono | input rate | yes |137| Interview | `.m4a` | AAC-LC, 96 kbps per channel | stereo if the input provides it | input rate | yes |138| High Quality | `.wav` | Linear PCM, 24-bit | stereo if the input provides it | input rate | no |139| Lossless | `.m4a` | Apple Lossless, 24-bit | stereo if the input provides it | input rate | no |140141Apple's AAC encoder accepts only certain bit rates for a given sample rate and channel count, and nothing above 48 kHz. The writer asks the encoder for its valid rates and takes the closest one, and resamples higher-rate input to 48 kHz. (A fixed 96 kbps request used to fail at 22.05 kHz mono; that case is now a regression test.)142143**How a session is captured.** Whatever the preset, the session is first written as uncompressed PCM to a capture master (16-bit for the AAC presets, 24-bit otherwise). The library file is encoded from the master when you stop, re-opened, and its duration checked before the master is deleted. See [Audio Architecture](#19-audio-architecture) and [docs/architecture/recording.md](docs/architecture/recording.md).144145**Safety nets.** Recording refuses to start with less than 128 MB free and stops itself, saving what it has, below 64 MB. If the storage can't keep up, the dropped sample count is shown instead of being hidden.146147## 5. Background Recording148149The app declares the `audio` background mode and records with the `.playAndRecord` session category, which is Apple's documented way to keep capturing when the screen locks or the app moves to the background. A Live Activity shows the recording on the Lock Screen and in the Dynamic Island, with pause/resume and add-marker buttons implemented as `LiveActivityIntent`s.150151<p align="center"><img src="docs/assets/diagrams/background-lifecycle.svg" alt="Background recording lifecycle" width="820"></p>152153- **Interruptions** (a call, an alarm, another app taking the microphone): capture pauses, a marker is added at that position, and recording resumes when iOS reports that it may, or on your tap.154- **Route changes** (headphones, Bluetooth, USB): the engine is re-tapped; if the new input has a different sample rate its audio is resampled so the master keeps one rate.155- **Files stay writable under lock** because they use the "complete until first user authentication" protection class. The stricter "complete" class would fail every write on a locked device.156157What it does not do: it does not record covertly (the system microphone indicator and the Live Activity are always present), and it does not survive a force-quit, a crash or a shutdown *as a running recording*. In those cases the audio already flushed to disk — at most two seconds behind — remains a valid file and is offered for recovery.158159> **Not verified on hardware.** Locked-screen capture, the Live Activity, interruptions and route changes need a physical iPhone and none was connected. In the simulator, the recovery path was exercised for real: the app was terminated mid-recording and the 33-second capture was found and recovered at the next launch. See [docs/architecture/background-audio.md](docs/architecture/background-audio.md).160161## 6. Multicolor Waveforms162163A waveform sample has an amplitude, not a colour. To colour it meaningfully the app measures the spectrum around each moment.164165<p align="center"><img src="docs/assets/diagrams/waveform-rendering.svg" alt="Waveform rendering pipeline" width="760"></p>166167For every bucket of 512 samples the processor stores the exact minimum, maximum and RMS, and the power in seven bands taken from a 4096-point Hann FFT whose window ends at the bucket's last sample.168169| Band | Range | Colour |170|---|---|---|171| Sub-bass | 20–60 Hz | `#7C3AED` |172| Bass | 60–250 Hz | `#3B82F6` |173| Low-mid | 250–500 Hz | `#06B6D4` |174| Mid | 500 Hz–2 kHz | `#22C55E` |175| Upper-mid | 2–4 kHz | `#EAB308` |176| Presence | 4–6 kHz | `#F97316` |177| Brilliance | 6–20 kHz | `#F43F5E` |178179The band edges live in `FrequencyBandLayout` and are configurable in code. Four drawing styles use the same data:180181| Style | What it shows |182|---|---|183| Frequency colours | bar tinted by the amplitude-weighted mix of the band colours |184| Band shares | bar split into stacked segments, one per band — readable without colour vision |185| Amplitude | plain minimum / maximum |186| RMS and peak envelope | RMS drawn over the peak envelope |187188The 4096-point window gives 11.7 Hz bins at 48 kHz, enough to tell sub-bass from bass. The price is that colour responds over about 85 ms while the bar heights are exact per bucket. Quiet files are magnified vertically for readability, and the factor is printed on the plot ("display ×2.4"); it never changes a measurement.189190The file view supports pinch zoom, pan, tap to seek, drag to select a range, markers, a playback cursor and image export. A summary is a pyramid of levels, each half the resolution of the one below, cached at 40 bytes per bucket. Not included: a per-channel stereo waveform (the display is a mono mix).191192## 7. Spectrum Analyzer193194Live while recording, and at the playhead for files.195196- FFT sizes 1024 to 16 384; Hann, Hamming, Blackman, Blackman–Harris, flat top and rectangular windows.197- Linear or logarithmic frequency axis, 20 Hz–20 kHz.198- Exponential smoothing (applied to power, the statistically meaningful average) and peak hold with selectable decay.199- A draggable cursor reading frequency and level; dominant frequency by parabolic interpolation.200- Seven band meters under the plot.201202The three scalings are different physical quantities and are never mixed. With `X[k]` the DFT of the windowed frame, `N` the FFT size, `CG` the window's coherent gain, `NPG` its noise power gain and `fs` the sample rate:203204| Scaling | Formula (one-sided, `0 < k < N/2`) | Reads | Unit |205|---|---|---|---|206| Amplitude | `2·|X[k]| / (N·CG)` | a sine of amplitude A reads A | dBFS, 20·log₁₀ — a full-scale sine is 0 dBFS |207| Power | `2·|X[k]|² / (N²·CG²)` | A²/2, the mean-square power of that sine | dBFS (RMS), 10·log₁₀ |208| Power spectral density | `2·|X[k]|² / (fs·N·NPG)` | integrates to the signal's mean-square power | dBFS/Hz |209210The DC and Nyquist bins are not doubled. Band power divides the summed bins by the window's equivalent noise bandwidth so that a band holding one sine reads that sine's power.211212| Window | Coherent gain | ENBW (bins) |213|---|---|---|214| Rectangular | 1.000 | 1.000 |215| Hann | 0.500 | 1.500 |216| Hamming | 0.540 | 1.363 |217| Blackman | 0.420 | 1.727 |218| Blackman–Harris | 0.359 | 2.004 |219| Flat top | 0.216 | 3.770 |220221## 8. Spectrogram222223A short-time Fourier transform shown as colour: time across, frequency up, amplitude in dBFS as colour, with a legend that states the range.224225<p align="center"><img src="docs/assets/diagrams/spectrogram-tiles.svg" alt="Spectrogram tile processing" width="760"></p>226227- Frequency resolution from FFT 512 to 8192; time resolution follows the zoom.228- Linear or logarithmic frequency axis, adjustable top frequency and dB range.229- Six palettes: ORIX Spectrum, Scientific, Thermal, Monochrome, High Contrast, Colorblind-friendly. Five of them rise monotonically in lightness (this is tested); High Contrast uses hard steps on purpose.230- Tap to read time, frequency and level at a point; the time axis is shared with the waveform and the playback cursor.231- High-resolution PNG export of the whole file.232233Long files are handled in tiles of 256 columns computed on demand at the resolution the zoom needs. Coarser levels take the maximum over consecutive columns rather than skipping audio, so a 20 ms click is still visible when a two-hour file fills the screen (also tested). Tiles are rasterised on the CPU through a 256-entry palette table.234235## 9. Audio Analysis236237One pass over the file, in chunks, with memory use independent of length.238239| Group | Measurements |240|---|---|241| Time domain | sample peak, RMS, crest factor, DC offset, zero-crossing rate, clipping (runs of ≥ 3 samples at ≥ 0.999 FS), background level (10th percentile of 400 ms RMS), dynamic spread, silences (≥ 0.5 s below −50 dBFS) |242| Loudness | integrated, maximum momentary (400 ms) and short-term (3 s) loudness, loudness range, true peak, a short-term series for plotting |243| Frequency domain | centroid, bandwidth, rolloff (85 %), flatness, flux, dominant frequency, band energy, spectral peaks, long-term average spectrum |244| Speech activity *(estimates)* | active time and share, pauses, mean and longest pause, speaking rate when a transcript exists |245| Findings | clipping, low level, little contrast between quiet and loud parts, long silence, potential distortion, unusual frequency concentration, DC offset, limited bandwidth |246247Peak and clipping are measured per channel so a clipped channel is not hidden by the mono mix. Speech activity is a heuristic on energy in the 300–3400 Hz band and is labelled "Estimate" wherever it appears. Findings are indications drawn from the numbers beneath them, not forensic or medical conclusions. Method and validation: [docs/reports/dsp-validation.md](docs/reports/dsp-validation.md).248249## 10. Transcription250251<p align="center"><img src="docs/assets/diagrams/transcription.svg" alt="On-device transcription paths" width="760"></p>252253- **Primary path:** `SpeechAnalyzer` with `SpeechTranscriber`, on-device by design, with per-run audio time ranges.254- **Fallback:** `SFSpeechRecognizer` with `requiresOnDeviceRecognition = true`, used only where it reports on-device support.255- **Otherwise:** the app says the language can't be transcribed on this device. There is no server path.256257The language list comes from the system at run time; nothing beyond it is offered. When a speech model isn't installed, the app asks before downloading it — that step needs a connection once and transfers a model, not audio.258259Recordings, imports and the audio extracted from videos can all be transcribed, with progress and cancellation. The transcript follows playback, can be searched (case- and accent-insensitive), edited line by line, labelled with speakers by hand, copied, and exported as text, Markdown, SRT, WebVTT, CSV, JSON or PDF. Live text while recording is optional and display-only; capture never depends on it.260261**Measured accuracy** — `SpeechTranscriber` on macOS 27, speech synthesised with macOS voices:262263| Locale | Voice | Reference words | Substitutions | WER | CER |264|---|---|---|---|---|---|265| en-US | Samantha | 163 | 3 | 1.84 % | 0.94 % |266| en-US | Daniel | 163 | 3 | 1.84 % | 0.94 % |267| fr-CA | Amélie | 182 | 1 | 0.55 % | 0.09 % |268| fr-CA | Thomas | 182 | 0 | 0.00 % | 0.00 % |269270Read these as an upper bound. Synthetic speech is clean, close and unhurried; a real room with several voices will do worse. The numbers were measured on a Mac, not on an iPhone. Full report: [docs/reports/transcription-benchmark.md](docs/reports/transcription-benchmark.md).271272## 11. Foundation Models Intelligence273274Speech recognition produces the transcript. Apple's on-device language model then reads that text — it never hears audio.275276<p align="center"><img src="docs/assets/diagrams/foundation-models.svg" alt="Map, verify, reduce" width="760"></p>2772781. **Map.** The transcript is numbered line by line and cut into chunks of at most 4200 characters. For each chunk the model fills a typed structure (title, summary, key points, action items, decisions, topics) and must cite the line number behind every point.2792. **Verify.** A citation holds only if the line exists inside the chunk the model was shown *and* the point shares vocabulary with that line or a neighbour. A task owner is kept only if that name appears in the transcript.2803. **Reduce.** With more than one chunk, an overall title and summary are written from the section summaries.281282Points that fail verification are not hidden and not trusted: they appear in a separate "not traced to a transcript line" group. Tapping a verified point plays the recording from its source. Everything is labelled as AI-generated and can be edited or deleted. Questions about a recording work the same way, and an answer with no valid citation is reported as not answered by the transcript.283284The app checks `SystemLanguageModel.default.availability` and explains the reason when it is unavailable. Recording, analysis and transcription don't depend on it.285286**Verified on macOS 27** with the benchmark transcripts: 7 of 7 generated points grounded in English, 8 of 8 in French; "Who will prepare the release notes?" answered with a citation; "What is the capital of France?" and "Quel temps fera-t-il demain?" correctly refused. Outputs are saved in [`Benchmarks/results/`](Benchmarks/results/). Generation fails inside the iOS 26.5 simulator and has never been run on an iPhone.287288## 12. Meeting Studio289290The Meeting, Lecture and Interview presets set the recording kind, which shapes the notes that follow. A meeting can carry a title, participants typed by you, markers, a transcript, a summary, action items with owners, decisions, topics and chapters, a search across all of it, and exports of the audio, transcript and notes.291292**Speakers.** There is no automatic speaker separation: Apple offers no on-device diarization API and none was built. You can label lines "Speaker 1" to "Speaker 6" by hand. The app never infers who is speaking from a voice.293294**Consent.** Before the first recording the app reminds you that recording people without their knowledge can be illegal and asks you to confirm. The reminder can be re-enabled in Settings.295296## 13. Audio and Video Import297298From Files (audio or video, several at once), from Photos (video), or by opening a file in ORIX Audio from another app.299300```301Import → inspect metadata → extract or decode audio → waveform → spectrum → spectrogram → transcribe → report → export302```303304- **Audio** is copied into the library unchanged. Anything Core Audio can open is accepted. The tests read back WAV, AIFF, CAF, Apple Lossless, AAC and MP3 files, and import WAV at 8, 22.05, 44.1 and 96 kHz in mono and stereo.305- **Video** has its first audio track extracted. AAC and Apple Lossless tracks are copied bit for bit into an `.m4a`; any other codec is decoded and stored as Apple Lossless. The video file is never modified (tested byte for byte).306- **Metadata shown:** duration, sample rate, channels, codec, bit depth, bit rate, file size, source file name.307- **Failures are clean:** a video with no audio track, a truncated file or random bytes produce a message and leave nothing behind in the library.308309Not every codec a container can hold is decodable on iOS; when AVFoundation can't read a track, the import says so.310311## 14. Audio Editing312313The editor works on an edit decision list. The original file is never touched; saving renders a new recording.314315| Operation | Notes |316|---|---|317| Trim / crop to selection, delete selection, silence selection | |318| Split at playhead, insert silence | |319| Merge (append another recording) | both must have the same sample rate |320| Fade in / fade out | raised-cosine ramps |321| Gain | whole recording or selection |322| Normalize | peak measured by a render pass, then set to −1 dBFS |323| Remove silences | from measured silences, keeping 0.15 s of padding |324| Channels | original, mono mix, left only, right only |325| Enhance | see below |326| Undo / redo | 100 steps, stored with the document |327328**Enhancement chain** — all streaming, so file length doesn't matter:329330- High-pass and low-pass, 24 dB/octave Butterworth.331- Three-band equalizer: 150 Hz shelf, 1.5 kHz peak, 6 kHz shelf.332- Feed-forward compressor with a 6 dB soft knee.333- Noise reduction by spectral subtraction, using the 200 quietest non-silent frames of the recording as the noise profile. It works on steady noise such as hiss, hum or a fan; it cannot separate voices or remove music.334- Voice enhance: a fixed chain (80 Hz high-pass, presence lift, 3:1 compression), not a learned model.335336Not offered: de-essing and source separation — there is no validated implementation of either.337338## 15. Playback339340Play, pause, seek, scrub on the waveform, skip 15 seconds, jump between markers, loop a selection, and six speeds from 0.5× to 2× with pitch preserved. The cursor follows on the waveform and spectrogram and the transcript highlights the current line. Playback continues in the background with Lock Screen controls, pauses on an interruption, and pauses rather than switching to the speaker when headphones are unplugged.341342## 16. Local Library343344All, Recent, Favourites, folders and Recently Deleted (kept 30 days). Search covers titles, notes, participants and transcript text. Sort by date, title, duration or size; filter by transcript, kind, imported or lossless. Rename, duplicate, move, favourite, delete, restore, and select several recordings for batch actions. Each row shows a waveform thumbnail, date, duration, size, codec and status chips.345346Metadata lives in SwiftData; audio and its sidecars live in one folder per recording, written atomically. There is no iCloud sync. Layout: [docs/architecture/storage.md](docs/architecture/storage.md).347348## 17. ORIX Actions349350Reusable workflows: an ordered list of steps with editable parameters, run on one recording or many, with a per-step log, progress, cancellation and a list of the files produced.351352| Step | What runs |353|---|---|354| Analyze | the full analysis pass |355| Transcribe | on-device transcription in the chosen language |356| Summarize | notes from the transcript (skipped with an explanation when the model is unavailable) |357| Remove silence | cuts measured silences longer than a threshold |358| Enhance | noise reduction and the voice chain or a high-pass |359| Normalize | to a target peak |360| Convert | to any export format |361| Export transcript / Export analysis report | a shareable file |362363Audio steps are collected and rendered once into a **new** recording; the original is left byte-for-byte intact (tested). A step that can't run is reported as failed or skipped, never faked. A workflow can run automatically after each recording or each import. Four starter workflows are provided and are ordinary, editable workflows: Meeting notes, Clean up voice, Archive as lossless, Subtitles.364365## 18. Export366367| Kind | Formats |368|---|---|369| Audio | WAV (PCM 16- or 24-bit), AIFF (PCM 16-bit), CAF (PCM 24-bit), M4A Apple Lossless (24-bit), M4A AAC — whole recording or the selection; or the original file |370| Transcript | text, Markdown, SRT, WebVTT, CSV, JSON, PDF |371| Notes | Markdown, PDF, JSON |372| Analysis report | PDF, Markdown, CSV, JSON — every value with its unit |373| Images | waveform PNG, spectrogram PNG |374375**Why no MP3:** iOS ships an MP3 decoder but no encoder, so MP3 files can be imported and not written. A test asserts MP3 is absent from the export list.376377## 19. Audio Architecture378379<p align="center"><img src="docs/assets/diagrams/capture-pipeline.svg" alt="Audio capture pipeline" width="820"></p>380381| Component | Where | Role |382|---|---|---|383| `AudioSessionManager` | app | session category, inputs, stereo pattern, route description |384| `AudioCaptureEngine` | app | input tap, two ring buffers, writer and analysis threads |385| `CAFWriter` | core | append-only PCM master that is valid after every write |386| `RecorderController` | app | lifecycle, interruptions, Live Activity, finalization |387| `RecordingFinalizer`, `RecordingRecovery` | app | encode and verify; find interrupted sessions |388| `WaveformProcessor`, `SpectrumAnalyzer`, `SpectrogramProcessor` | core | DSP for visuals |389| `AudioAnalyzer` and the accumulators | core | whole-file analysis |390| `PlaybackEngine` | app | player node, time-pitch, looping, Now Playing |391| `MediaImporter` | app | copy audio, extract video audio |392| `TranscriptionEngine`, `LiveTranscriber` | core | on-device speech |393| `MeetingIntelligence` | core | grounded notes and questions |394| `EditDocument`, `EditRenderer`, `EffectChain` | core | non-destructive editing |395| `AudioFileWriter`, `ExportService` | core / app | encoders and shareable files |396| `ActionRunner` | app | workflows |397398**Threads.** The input tap only copies samples into two wait-free single-producer/single-consumer rings. A writer thread drains one into the master and calls `fsync` every two seconds. An analysis thread drains the other into the DSP that feeds the meters and plots. A stalled interface or a slow FFT cannot delay a write, and a slow disk cannot block the tap.399400**Why the master is recoverable.** It is a Core Audio Format file whose audio chunk declares size −1, which the CAF specification defines as "extends to the end of the file". No header ever needs patching, so the bytes on disk are a complete, readable file at any instant, even with a torn final write.401402<p align="center"><img src="docs/assets/diagrams/realtime-dsp.svg" alt="Real-time analysis thread" width="760"></p>403404More: [overview](docs/architecture/overview.md) · [audio engine](docs/architecture/audio-engine.md) · [recording](docs/architecture/recording.md) · [background audio](docs/architecture/background-audio.md) · [storage](docs/architecture/storage.md).405406## 20. DSP Methodology407408Signal processing uses Accelerate/vDSP for the transforms and vector arithmetic; filters and loudness run in double precision.409410- **FFT.** `vDSP_fft_zrip`, whose real forward transform returns twice the mathematical DFT; the squared magnitudes are divided by four before any scaling. Windows are generated in periodic (DFT-even) form.411- **Dominant frequency.** Strongest bin above 20 Hz, refined by parabolic interpolation on log magnitude; nothing is reported below −90 dBFS.412- **Loudness.** ITU-R BS.1770-4 for mono and stereo: K-weighting from closed-form coefficients that reproduce the standard's 48 kHz table to 1e-8 and give the equivalent response at other rates; 400 ms blocks with 75 % overlap; absolute gate at −70 LUFS and relative gate 10 LU below. Loudness range follows EBU Tech 3342. True peak uses a 4× oversampling 48-tap Kaiser-windowed sinc.413- **Noise reduction.** 1024-point Hann analysis and synthesis at 75 % overlap, over-subtraction 1–3×, a gain floor of −6 to −24 dB and temporal smoothing of the gains.414415**Validation.** Every measurement is checked against a signal whose answer is known in advance: sines, multi-tones, white and pink noise, chirps, impulses, silence and clipped waves. A few of the 83 checks:416417| Check | Expected | Tolerance |418|---|---|---|419| Bin-centred sine, all six windows, four FFT sizes | reads its amplitude | 0.001 |420| Flat-top window, off-bin sine | 0 dBFS | 0.02 dB |421| Hann scalloping loss | 1.42 dB worst case | 1.3–1.5 dB |422| White-noise PSD, integrated | the variance | 3 % |423| Dominant frequency, FFT 8192 | 61.7 Hz … 9876.5 Hz | 0.5 Hz |424| Chirp ridge in the spectrogram | instantaneous frequency | 2 bins |425| Full-scale 997 Hz sine, at 44.1, 48 and 96 kHz | −3.01 LKFS | 0.05 |426| Synthesised EBU Tech 3341 cases 1–5 | −23.0 / −33.0 LUFS | 0.1 LU |427| Synthesised EBU Tech 3342 cases 1–2 | 10 LU, 5 LU | 1 LU |428| Inter-sample peak, fs/4 sine at 45° | 0 dBTP | 0.3 dB |429| Butterworth filters at cutoff | −3.01 dB | 0.15 dB |430431The loudness tests use signals synthesised to the EBU specifications, not the official EBU files, so the accurate description is *implements BS.1770-4, verified against synthesised reference signals* — not a claim of certification. Details: [docs/architecture/dsp.md](docs/architecture/dsp.md) and [docs/reports/dsp-validation.md](docs/reports/dsp-validation.md).432433## 21. Technology Stack434435| Area | Used |436|---|---|437| Language and UI | Swift 6 with strict concurrency, SwiftUI, Observation |438| Capture and playback | AVFoundation, AVAudioEngine, AVAudioSession, AVAudioConverter |439| DSP | Accelerate / vDSP |440| Speech | Speech (`SpeechAnalyzer`, `SpeechTranscriber`, `SFSpeechRecognizer` on-device only) |441| Language model | FoundationModels (`LanguageModelSession`, guided generation) |442| Drawing | SwiftUI `Canvas`, Core Graphics images |443| Persistence | SwiftData for metadata, FileManager for audio and sidecars, iOS file protection |444| System integration | ActivityKit and WidgetKit (Live Activity), App Intents, MediaPlayer, LocalAuthentication, PhotosUI |445| Project | XcodeGen (`project.yml`), Swift Package Manager |446447**Metal was evaluated and not used.** Rasterising a 512 × 512 spectrogram tile on the CPU through a palette table was measured at 0.65 ms on the development Mac, far inside a frame, so Core Graphics tiles drawn in a SwiftUI `Canvas` were kept. A GPU path would add complexity without a measured need; that could change after profiling on older iPhones. The reasoning is in [docs/architecture/visualization.md](docs/architecture/visualization.md).448449## 22. Project Structure450451```text452ORIXAudio/453├── project.yml XcodeGen definition (app, Live Activity extension, unit and UI tests)454├── Core/ Swift package ORIXAudioCore — no UI, builds on iOS and macOS455│ ├── Sources/ORIXAudioCore/456│ │ ├── DSP/ FFT, windows, spectrum, spectrogram, waveform, filters, effects, palettes457│ │ ├── Analysis/ time-domain, spectral, loudness, speech activity, findings, analyzer458│ │ ├── Capture/ ring buffer, CAF master writer459│ │ ├── Editing/ edit document, renderer460│ │ ├── Export/ audio file I/O, text exporters461│ │ ├── Speech/ transcription engine, transcript model, error rates462│ │ └── Intelligence/ grounded notes and questions463│ ├── Sources/orix-bench/ command-line benchmarks (macOS)464│ └── Tests/ 83 reference-signal and engine tests465├── ORIXAudio/ the app466│ ├── App/ entry point, root navigation, debug hooks, core wording467│ ├── DesignSystem/ tokens and components468│ ├── Models/ SwiftData models, presets, workflow steps469│ ├── Services/ session, capture, recorder, finalizer, playback, import, export, actions470│ ├── Features/ Recorder, Library, Detail, Editor, Actions, Settings, Visuals471│ └── Resources/ asset catalog, string catalogs, privacy manifest472├── ORIXAudioWidgets/ Live Activity473├── Shared/ Live Activity attributes and intents474├── Tests/ UITests/ app tests (21) and UI tests (8), with fixtures475├── Benchmarks/ reference passages and measured results476├── Localization/ fr-CA translations477├── Scripts/ build, test, simulator, screenshots, localization, icon, badges478└── docs/ architecture, design, development, release, reports, screenshots, assets479```480481## 23. Installation482483There is no public build yet. To run it from source you need a Mac with Xcode 27 (Swift 6.4, iOS 27 SDK), an iOS 26 or later simulator or device, and [XcodeGen](https://github.com/yonaskolb/XcodeGen) (`brew install xcodegen`). Full notes: [docs/development/setup.md](docs/development/setup.md).484485## 24. Build Instructions486487```bash488xcodegen generate # creates ORIXAudio.xcodeproj from project.yml489open ORIXAudio.xcodeproj # then run the ORIXAudio scheme490491Scripts/build.sh # or: command-line Debug build for the simulator492SIM="ORIXAudio iPad" Scripts/build.sh # choose another simulator by name493```494495The Xcode project is generated and not committed. Signing uses team `3YM54G49SN` with automatic signing; simulator builds need no signing.496497## 25. Testing498499```bash500Scripts/test.sh core # 83 tests, Swift package, runs on macOS in about a minute501Scripts/test.sh app # 21 tests in the simulator: capture pipeline, recovery, import, library, actions, exports502Scripts/test.sh ui # 9 XCUITest flows in the simulator (incl. the accessibility audit)503Scripts/bench-transcription.sh # word and character error rates, English and French504Scripts/l10n.py --check # fails if any string lacks a French translation505```506507| Suite | Tests | Where it ran | Result on 2026-11-20 |508|---|---|---|---|509| Core (`ORIXAudioCoreTests`) | 83 in 14 suites | macOS 27 | all passed |510| App (`ORIXAudioTests`) | 21 in 4 suites | iOS 26.5 simulator, iPhone 17 Pro | all passed |511| UI (`ORIXAudioUITests`) | 8 | iOS 26.5 simulator, iPhone 17 Pro | all passed |512513The app tests drive the real capture engine through a debug-only file input and assert, among other things, that every accepted frame is written, that nothing is captured while paused, that each preset produces the format it declares, that an interrupted session with a torn write is recovered, and that a workflow leaves the original file intact. There is no continuous integration; the suites are run by hand. What the simulator cannot test is listed in [docs/development/testing.md](docs/development/testing.md).514515## 26. Performance516517Measured with `orix-bench` in a release build on a Mac with an Apple M5 Max, single thread. **These are not iPhone numbers**; they show the cost of the algorithms, not battery or thermal behaviour on a phone.518519| Operation | Result |520|---|---|521| FFT 4096 (window, transform, scaling) | 2.5 µs |522| Live spectrum frame (4096 points, smoothing, peak hold, bands) | 15.1 µs |523| Waveform summary with band colours, 60 s of audio | 14 ms |524| Spectrogram 2048/512, 60 s of audio | 15 ms |525| Rasterise a 512 × 512 spectrogram tile | 0.65 ms |526| BS.1770 loudness and true peak, 60 s mono | 95 ms |527| Full analysis, 10 min stereo 48 kHz | 2.74 s |528| Export 10 min stereo to Apple Lossless | 1.28 s |529| Export 10 min stereo to AAC | 2.11 s |530| Noise reduction, voice enhance and export, 10 min stereo | 3.67 s |531| Transcription, about 60 s of speech | 0.6–0.7 s |532533Not measured: CPU, battery and memory while recording on an iPhone. Full table and method: [docs/reports/performance.md](docs/reports/performance.md).534535## 27. Privacy536537- No account, no sign-in, no analytics, no advertising, no tracking.538- The app contains no networking code of its own.539- Recordings, transcripts, notes and reports are stored only on the device, under iOS file protection.540- Transcription never falls back to a server; summaries use the on-device model or are unavailable.541- Microphone access is requested when you first record; Photos is reached through the system picker, which needs no library permission; Face ID or passcode lock is optional.542- Transcript text is never logged.543- The privacy manifest declares no collected data and no tracking.544545One thing to know: when the legacy recogniser is the only on-device path for a language, iOS shows its standard speech-recognition prompt, whose stock wording mentions sending audio to Apple. ORIX Audio forces on-device recognition on that path, and its own text in the prompt says so. Details: [docs/reports/privacy.md](docs/reports/privacy.md).546547## 28. Accessibility548549VoiceOver labels and values on every control and plot (the waveform is adjustable to scrub; the spectrum announces its dominant frequency), Dynamic Type text styles throughout, Reduce Motion honoured by the live views, and no information carried by hue alone: bands are named beside their colours, the "band shares" waveform and three spectrogram palettes work without colour vision, and status chips pair colour with a symbol and a word.550551This was reviewed in code and in the simulator, not audited with assistive technology on a device. Findings and gaps: [docs/reports/accessibility.md](docs/reports/accessibility.md).552553## 29. Localization554555English and French (Canada), more than 600 strings, none untranslated (`Scripts/l10n.py --check` fails otherwise). Strings are extracted from the compiler's output rather than typed by hand, merged with `Localization/fr-CA.json` by `Scripts/l10n.py`, and checked by a UI test that launches the app in French. Dates, durations, byte counts and numbers use the system formatters. The permission texts are localised too.556557## 30. Roadmap558559Ordered by what would most change confidence in the product:5605611. Validate on physical iPhones and iPads: locked-screen recording over hours, interruptions, route changes, the Live Activity, battery and thermal behaviour.5622. Measure transcription on real recordings of real rooms, in both languages.5633. Per-channel stereo waveform.5644. Profile the visualisations on older devices and revisit a Metal path if the numbers call for it.5655. Bake playback speed into exports; allow merging files with different sample rates.5666. Speaker separation, if Apple ships an on-device API or a validated model becomes available.567568## 31. Release Status569570As of 2026-11-20:571572| Item | Status |573|---|---|574| Implementation | complete; builds and runs in the iOS 26.5 simulator on iPhone and iPad |575| Automated tests | 83 core, 21 app, 9 UI — all passing |576| DSP validation | done against synthesised reference signals |577| Transcription accuracy | measured on macOS with synthetic speech only |578| Foundation Models | verified on macOS; fails to generate in the simulator; untested on iOS hardware |579| Physical-device validation | **pending — no device was available** |580| Repository | published at `https://git.spboucher.ai/orix-audio` (the host has no private mode; publication was the owner's choice) |581| App Store Connect | app record created (ID 6837544792); IPA validated with no errors |582| TestFlight | build 1.0.0 (1) uploaded and processed; available to internal testers only. Not submitted for external testing or App Review. Details: [RELEASE-REPORT.md](RELEASE-REPORT.md), [docs/release/apple-developer-verification.md](docs/release/apple-developer-verification.md) |583584By the project's own quality gates, ORIX Audio is **not release-ready** until background recording has been tested on a physical iPhone. Checklist: [docs/release/checklist.md](docs/release/checklist.md).585586## 32. Known Limitations587588- **Nothing has run on a physical device.** Locked-screen and background recording, the Live Activity and Dynamic Island, real microphone capture, built-in stereo capture, Bluetooth and wired route changes, phone-call interruptions and battery use are untested on hardware.589- **Speech and language models on iOS are untested on hardware.** Transcription was measured on macOS; Foundation Models was verified on macOS and cannot generate in the iOS 26.5 simulator.590- **No speaker diarization.** Manual labels only.591- **The waveform is a mono mix.** Peak and clipping are measured per channel, but there is no per-channel waveform.592- **No MP3 export**, no de-essing, no source separation.593- **Playback speed is not applied to exports.**594- **Merging needs equal sample rates.**595- **No Metal renderer**; visualisations are drawn with Canvas and Core Graphics.596- **Speech-activity figures are heuristics** and findings are indications.597- **Live text needs an installed speech model** and is display-only; the saved transcript always comes from the file.598- **No iCloud sync.** Recordings are included in device backups like other app data.599- **A recording does not continue through a force-quit, crash or shutdown.** Audio up to the last two-second checkpoint stays in a valid file and is offered for recovery.600- **Loudness** covers mono and stereo and was verified against synthesised signals, not the official EBU test files.601- **The system speech-recognition prompt** on the legacy path uses Apple's stock wording about sending audio to Apple, although on-device recognition is enforced.602- **Accuracy and performance figures** come from a Mac and from synthetic speech.603604## 33. ORIX Ecosystem605606ORIX is a family of exact Apple utilities. ORIX Scan and ORIX Calc are sibling projects. The three share the same neutral colours, spacing and radii, and one icon rule — *a ring on a full-bleed tile* — with each app bringing its own accent pair and inner glyph. ORIX Audio's pair is cyan `#22D3EE` with violet `#8B5CF6`, and its ring holds seven bars in the band colours.607608The shared values are copied, not linked: ORIX Audio has no runtime or build dependency on the other apps. See [design system](docs/design/design-system.md), [brand guidelines](docs/design/brand-guidelines.md) and [icon design](docs/design/icon-design.md).609610## 34. License611612Proprietary. Copyright © 2026 Simon-Pierre Boucher. All rights reserved. See [LICENSE](LICENSE).613614<p align="center"><img src="docs/assets/orix-audio-logo.svg" alt="ORIX Audio" width="260"></p>615