voice_upload

Upload Voice to Library

Description

Uploads a voice sample to the server’s voice library for reuse. Once uploaded, the voice can be used by name in tts().

Usage

voice_upload(voice_file, voice_name, language = NULL)

Arguments

  • voice_file: Character. Path to the voice sample file (mp3, wav, etc.).
  • voice_name: Character. Name to save the voice as.
  • language: Character or NULL. Language code (e.g., “en”, “fr”, “es”).

Value

Invisibly returns the response from the server.

Examples

set_tts_base("http://localhost:7810")

# Upload a voice
voice_upload(
  voice_file = "my_voice.wav",
  voice_name = "my-custom-voice"
)

# Upload with language
voice_upload(
  voice_file = "french_voice.wav",
  voice_name = "french-speaker",
  language = "fr"
)

# Then use it by name
tts(
  input = "Hello with my custom voice!",
  voice = "my-custom-voice",
  file = "output.wav"
)