← All Components

VoicePlayer

Media

Audio player with voice selection and playback controls.

Live Demo

Inline voice playback widget with voice selection. Requires a TTS API backend.

VoicePlayer renders as an inline play button that expands to show voice selection and playback controls.

Requires /api/voices and /api/tts endpoints.

<VoicePlayer text="Hello world" voiceId="en-US-female-27" voiceName="Sarah" />

Usage

<script>
  import { VoicePlayer } from "jatui"
</script>

<VoicePlayer />

Props

PropTypeDefaultDescription
textstring-Text to speak
voiceIdstring-Selected voice ID
voiceNamestring-Display voice name
autoPlaybooleanfalseAuto-play on load
expandDirection"left" | "right""left"Menu expand direction