voiceId method

ElevenLabsBuilder voiceId(
  1. String voiceId
)

Sets voice ID for ElevenLabs TTS

The voice ID determines which voice will be used for text-to-speech. You can get available voice IDs using the getVoices() method.

Example:

final provider = await ai()
    .elevenlabs((elevenlabs) => elevenlabs
        .voiceId('21m00Tcm4TlvDq8ikWAM'))
    .apiKey(apiKey)
    .build();

Implementation

ElevenLabsBuilder voiceId(String voiceId) {
  _baseBuilder.extension('voiceId', voiceId);
  return this;
}