Skip to content

feat(Podcasts, Audiobooks, Radio): Overcast-inspired Smart Speed, smart playlists, live radio PCM voice boost, and cross-platform listening parity - #548

Open
vizmoe wants to merge 15 commits into
chenqi92:mainfrom
vizmoe:issue/547-podcast-audiobook-radio-parity

Conversation

@vizmoe

@vizmoe vizmoe commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Closes #547

Summary

Upgrades Primuse's Podcast, Audiobook, and Live Radio listening spaces around shared cross-space DSP/policy modules (PrimuseKit) and extends parity across iOS, macOS, CarPlay, Apple Watch, Apple TV, and Siri/Shortcuts.

1. Shared Spoken-Word & Radio Audio Effects and Reliability

  • AirPlay Voice Boost routing & shared policies: Prevents AirPlay sample-buffer passthrough from bypassing Voice Boost across Podcasts, Audiobooks, and Live Radio via shared VoiceBoostActivationPolicy, SpokenWordAudioEffectsPolicy, and RemainingTimePolicy.
  • Overcast-inspired Smart Speed & 3× playback speed: Expands spoken-word playback rates up to 3.0× (music remains capped at 2.0×), introduces multi-tier Smart Speed intensity (Off / Mild / Standard / Strong) with live effective-rate estimation, and adds per-show / per-book / per-station overrides via a shared SpokenWordAudioEffectsSheet.
  • Playback, sync, and sleep timer fixes: Fixes local podcast intro/outro application, automatic cleanup of played podcast downloads, CloudKVS merging catch-up when local revision is newer, cross-item per-book speed reapplication, Audiobookshelf progress sync alongside TingReader (ServerSpokenWordProgressSyncCoordinator), opt-in shake-to-extend sleep timer (SleepTimerShakeExtender), spoken-word sleep-wake auto-rewind, and Apple TV fade-out & chapter sleep labels.

2. Live Radio Pipeline & Resilience

  • Local PCM decoding + 1-tap Voice Boost: Routes non-HLS live radio streams through a chunked local PCM decoding pipeline (FFmpegDecoderBridge stream reader + RadioFLACAudioDecoder), unlocking Voice Boost & EQ on live talk radio with a 1-tap per-station toggle on iOS, macOS, CarPlay, and Apple Watch.
  • Watchdog, reconnect & history: Adds a live-stream stall watchdog and immediate network-recovery reconnect (resetting backoff), improves metadata artwork resolution and played-track actions, fixes multi-station history cleanup, and supports Markdown history export.

3. Podcast & Audiobook Listening Depth

  • Overcast-style Podcast Smart Playlists: Adds PodcastSmartPlaylist / PodcastSmartPlaylistStore / PodcastSmartPlaylistsViews with show scope (All / Include / Exclude), ordered Priority Shows, status filters, max duration cap, 4 sort orders (Newest / Oldest / Shortest / Longest), remaining duration summaries, and tombstone-aware CloudKVS merging across iOS, macOS, CarPlay, and Shortcuts.
  • Chapters, search, clips, queue memory, single-file M4B & stats:
    • Synthesizes chapters from show-note timestamps, supports rich chapter artwork & external links, lock-screen chapter progress, drag-to-reorder podcast queue, Keep-Last-N episode retention, in-show & cross-show episode search, 5-minute intro/outro skip ranges, and per-show audio effects entry.
    • Unlocks playhead-centered audio clip export for Podcasts and Audiobooks (SongPlaybackRangeAvailability.supportsClipExport), adds bounded cross-space remembered podcast queue persistence (PodcastQueueMemoryStore + PodcastRememberedQueueBanner), unlocks SpokenWordBookDetailView for single-file M4B/M4A/MP3 audiobooks with offline embedded/generated chapter browsing and bookmarks (SpokenWordSingleFileChaptersSection), adds Markdown bookmark export, and adds a reusable cross-space listening stats strip (SpokenWordListeningStatsStrip).

4. CarPlay, Apple Watch, Apple TV & Siri/Shortcuts Parity

  • CarPlay (CarPlaySceneDelegate+ListeningSpaces): Adds 1-tap Remembered Podcast Queue resume and custom Podcast Smart Playlists (with Play All) in CarPlay Podcasts, 1-tap Live Radio Voice Boost on CarPlay Now Playing, and Voice Boost / Smart Speed / Add Bookmark actions in CarPlay Now Playing More.
  • Apple Watch & AppIntents: Extends WatchSessionBridge, WatchPlayerStore, PlaybackOptionsWatchView, and 16-locale WatchOfflineLocalization with playback speed cycle, Voice Boost (Podcasts / Audiobooks / Live Radio), Smart Speed cycle, and Add Bookmark; adds PrimusePodcastSmartIntents for playing Podcast Smart Playlists, resuming the remembered podcast queue, toggling Voice Boost, cycling Smart Speed, and adding spoken-word bookmarks.
  • Baseline tightening: Tightens file-size.tsv (23 touched files, including removing WatchSessionBridge.swift now under 1,000 lines) and observable-class-body.tsv (removing TingReaderProgressSyncCoordinator & RadioTitleHistoryStore, tightening CompanionAssetDownloadFlow).

Acceptance Criteria Coverage

  • Shared Voice Boost, multi-tier Smart Speed (Off/Mild/Standard/Strong), 3.0× spoken-word rate, per-item overrides, and AirPlay bypass protection implemented and tested.
  • Non-HLS Live Radio PCM pipeline, 1-tap per-station Voice Boost, stall watchdog, immediate network-recovery reconnect, and Markdown history export implemented and tested.
  • Podcast Smart Playlists with show scope, Priority Shows, status filter, duration cap, and tombstone-aware CloudKVS merge implemented and tested.
  • Show-note synthesized chapters, rich chapter artwork/links, Keep-Last-N, episode search, clip export, remembered podcast queue, single-file M4B detail with embedded chapters & bookmarks, and cross-space listening stats implemented and tested.
  • CarPlay, Apple Watch, Apple TV, and AppIntents integrations implemented and verified to build cleanly.
  • All 16 locales verified via ruby scripts/check-localizations.rb.
  • Architecture gate (--require-all --strict-baselines --range and --commits) verified with 0 errors, 0 warnings, and 0 skipped rules.

Verification

Tested on top of origin/main (ac6b49070), head revision 876f99982:

Check Scope / Command Result
PrimuseKit unit tests swift test --package-path PrimuseKit --filter "PodcastSmartPlaylistTests|SpokenWordListeningStatsPolicyTests|PodcastShowNotes|SpokenWordAudioEffectsPolicyTests|SpokenWordSmartSpeed|CarPlayLayoutConfigurationTests" 55 / 55 passed (7 suites)
PrimuseMacTests reliability tests xcodebuild test -scheme PrimuseMac -destination 'platform=macOS' -only-testing:PrimuseMacTests/ListeningSpacesReliabilityTests -only-testing:PrimuseMacTests/PodcastReliabilityTests CODE_SIGNING_ALLOWED=NO 24 / 24 passed
iOS + CarPlay + Watch companion build xcodebuild build-for-testing -scheme Primuse -destination 'generic/platform=iOS' ONLY_ACTIVE_ARCH=YES CODE_SIGNING_ALLOWED=NO TEST BUILD SUCCEEDED (iOS/watchOS simulator execution skipped locally due to host CoreSimulator runtime mismatch 1174.9.2 < 1174.21.0)
tvOS build xcodebuild build -scheme PrimuseTV -destination 'generic/platform=tvOS' ONLY_ACTIVE_ARCH=YES CODE_SIGNING_ALLOWED=NO BUILD SUCCEEDED (compile-only; no tvOS simulator/device attached locally)
Localization validation ruby scripts/check-localizations.rb (all 16 locales) Passed
Architecture gate (range) python3 -I scripts/gate/gate.py --root . --require-all --strict-baselines --range origin/main..HEAD (109 Swift files) 0 errors, 0 warnings, 0 skipped
Architecture gate (commits) python3 -I scripts/gate/gate.py --root . --commits origin/main..HEAD (15 signed commits) 0 errors, 0 warnings, 0 skipped

vizmoe added 15 commits December 2, 2026 02:26
@chenqi92

chenqi92 commented Dec 2, 2026

Copy link
Copy Markdown
Owner

This is too big to review and verify as one PR (131 files, +9.4k), and it now conflicts with main in AppServices.swift, SpokenWordStore.swift and WatchPlayerStore.swift. Could you split it, each on current main, with its own platform parity inside it rather than a separate parity PR:

  1. Shared spoken-word effects: the voice boost / AirPlay bypass policy, 3× for spoken word, the pause-shortening levels and per-show / per-book overrides.
  2. Live radio: the PCM pipeline with per-station voice boost, the stall watchdog and reconnect, history fixes and export.
  3. Podcast smart playlists.
  4. Chapters from show notes, episode search, clip export, the remembered queue, single-file M4B detail and listening stats.
  5. The smaller fixes (intro/outro, KVS catch-up, Audiobookshelf progress sync, sleep timer) as their own PR, so they can go in first.

Two things for all of them:

  • Please don't name things after another app's features in the UI. "Smart Speed" and "Voice Boost" are Overcast's names; I'm renaming the existing strings on main to neutral ones, so use those keys instead of adding new "Smart Speed" strings.
  • In each PR description, list every default that changes for people who already use the app (automatic cleanup of played downloads, shake to extend, anything that deletes or moves files). Those need to stay off unless the user turns them on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(Podcasts, Audiobooks, Radio): Overcast-inspired Smart Speed, smart playlists, live radio PCM voice boost, and cross-platform listening parity

2 participants