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
1voice_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
1set_tts_base("http://localhost:7810")
2
3# Upload a voice
4voice_upload(
5 voice_file = "my_voice.wav",
6 voice_name = "my-custom-voice"
7)
8
9# Upload with language
10voice_upload(
11 voice_file = "french_voice.wav",
12 voice_name = "french-speaker",
13 language = "fr"
14)
15
16# Then use it by name
17tts(
18 input = "Hello with my custom voice!",
19 voice = "my-custom-voice",
20 file = "output.wav"
21)