LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangGraph
  • Web
  • Channels
  • Pregel
  • Prebuilt
  • Remote
React SDK
Vue SDK
Svelte SDK
Angular SDK
LangGraph SDK
  • Ui
  • Client
  • Auth
  • React
  • Logging
  • React Ui
  • Utils
  • Server
  • Stream
LangGraph Checkpoint
LangGraph Checkpoint MongoDB
LangGraph Checkpoint Postgres
  • Store
LangGraph Checkpoint Redis
  • Shallow
  • Store
LangGraph Checkpoint SQLite
LangGraph Checkpoint Validation
  • Cli
LangGraph API
LangGraph CLI
LangGraph CUA
  • Utils
LangGraph Supervisor
LangGraph Swarm
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

LangGraph
WebChannelsPregelPrebuiltRemote
React SDK
Vue SDK
Svelte SDK
Angular SDK
LangGraph SDK
UiClientAuthReactLoggingReact UiUtilsServerStream
LangGraph Checkpoint
LangGraph Checkpoint MongoDB
LangGraph Checkpoint Postgres
Store
LangGraph Checkpoint Redis
ShallowStore
LangGraph Checkpoint SQLite
LangGraph Checkpoint Validation
Cli
LangGraph API
LangGraph CLI
LangGraph CUA
Utils
LangGraph Supervisor
LangGraph Swarm
Language
Theme
JavaScript@langchain/reactUseAudioPlayerOptions
Interface●Since v1.0

UseAudioPlayerOptions

Options for useAudioPlayer.

All fields optional; defaults cover OpenAI gpt-4o-audio-preview pcm16 streams (sampleRate: 24000, channels: 1) and any WAV stream the upstream model emits.

Copy
interface UseAudioPlayerOptions

Properties

property
autoPlay: boolean

Begin playback as soon as the first byte arrives (PCM strategy) or the blob settles (element strategy). Subject to browser autoplay policies — on sites without prior user gesture, the underlying play() may be rejected and the hook transitions to "error" with a descriptive message.

property
pcm: __type

Overrides for the PCM strategy. Ignored by the element strategy and by WAV streams (the RIFF fmt chunk is authoritative there).

property
pcmMimePrefixes: readonly string[]

Additional mime prefixes that should be treated as raw PCM16 (in addition to audio/pcm / audio/L16). Use when upstream reports a custom mime like audio/pcm16.

property
strategy: "pcm" | "element" | "auto"

Force a specific playback strategy. Default "auto" picks "pcm" for PCM / L16 / WAV mime types and "element" for everything else.

View source on GitHub