The Voice Changer performs speech-to-speech conversion: it takes any input audio recording and transforms it into a chosen ElevenLabs voice while preserving the original prosody, rhythm, and emotional delivery. This makes it ideal for dubbing performances, re-voicing podcast episodes, or applying a branded voice to recorded content without re-recording from scratch.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/phpaisdk/elevenlabs/llms.txt
Use this file to discover all available pages before exploring further.
Usage
CallElevenLabs::voiceChanger()->convert() with a target voice ID, a Content::audio() value wrapping the source file, and an optional options array.
Parameters
The ElevenLabs voice ID to convert the source audio into. Any voice ID from
your ElevenLabs workspace is accepted, for example
JBFqnCBsd6RMkjVDRZzb.The source audio to transform, wrapped in a
Content::audio() value.
Accepts a file path or inline bytes:An optional associative array of additional request fields. Most fields are
sent as multipart form parts; a small set of fields are promoted to query
parameters automatically — see Query parameters below.
Options
Request body fields
These options are sent in the multipart request body alongside the audio file.The speech-to-speech model to use. ElevenLabs recommends
eleven_multilingual_sts_v2 for high-quality multilingual conversion.When
true, background noise is stripped from the input audio before
conversion begins. Useful when the source recording was captured in a noisy
environment.Fine-grained voice control passed as a JSON object. Accepts
stability,
similarity_boost, style, and use_speaker_boost keys as documented by
ElevenLabs.Query parameters
The following fields are automatically extracted from the$options array and
appended to the request URL as query parameters instead of being sent in the
body. This matches the ElevenLabs API contract for the speech-to-speech
endpoint.
The desired audio encoding and sample rate of the returned file. Common
values include
mp3_44100_128, wav_44100, and pcm_16000. Defaults to
mp3_44100_128 when omitted.When
false, the request and response are excluded from ElevenLabs usage
logs and history.A legacy latency-optimisation level (0–4). Deprecated by ElevenLabs but
still accepted. Omit this field unless you have an existing integration that
depends on it.
output_format, enable_logging, and optimize_streaming_latency are
silently removed from the multipart body and sent as query parameters. All
other keys in $options remain in the request body.Return value
convert() returns an AudioResult. Access the converted audio through its
output property:
The converted audio file.
