# Smart Speed Phase 1 Design: Web Audio API Pipeline Refactor ## Status Work-in-progress for bead `audiobookshelf-hsc` (blocks `audiobookshelf-d8s`). ## Objective Refactor the local audio playback pipeline so that it can optionally route audio through the Web Audio API (AudioContext + MediaElementAudioSourceNode). This prepares the ground for Phase 2 (real-time silence detection) without changing audible behaviour when Smart Speed is OFF. --- ## 1. Current Audio Pipeline Architecture ### 1.1 Core Player Files - **`client/players/LocalAudioPlayer.js`** — The single source of truth for local HTML5 audio playback. - **`client/players/PlayerHandler.js`** — Mediates between the UI (`MediaPlayerContainer.vue`) and the concrete player (`LocalAudioPlayer` or `CastPlayer`). - **`client/players/CastPlayer.js`** — Chromecast player; **out of scope** for this refactor. Smart Speed will only apply to `LocalAudioPlayer`. ### 1.2 How Playback Currently Works `LocalAudioPlayer` creates a raw `