Class: Wave::Voice
- Inherits:
-
Object
- Object
- Wave::Voice
- Defined in:
- lib/wave/voice.rb
Overview
Voice — Text-to-speech synthesis and voice cloning
Instance Method Summary collapse
-
#clone(body) ⇒ Object
Clone a voice from audio samples (operationId: cloneVoice, POST /voice/clone).
-
#generate_speech(body) ⇒ Object
Generate speech from text (operationId: generateSpeech, POST /voice/generate).
-
#initialize(client) ⇒ Voice
constructor
A new instance of Voice.
-
#list(category: nil, language: nil) ⇒ Object
List available voices (operationId: listVoices, GET /voice/voices).
Constructor Details
#initialize(client) ⇒ Voice
Returns a new instance of Voice.
6 7 8 |
# File 'lib/wave/voice.rb', line 6 def initialize(client) @client = client end |
Instance Method Details
#clone(body) ⇒ Object
Clone a voice from audio samples (operationId: cloneVoice, POST /voice/clone).
25 26 27 |
# File 'lib/wave/voice.rb', line 25 def clone(body) @client.request("POST", "/voice/clone", body: body) end |
#generate_speech(body) ⇒ Object
Generate speech from text (operationId: generateSpeech, POST /voice/generate).
20 21 22 |
# File 'lib/wave/voice.rb', line 20 def generate_speech(body) @client.request("POST", "/voice/generate", body: body) end |
#list(category: nil, language: nil) ⇒ Object
List available voices (operationId: listVoices, GET /voice/voices).
11 12 13 14 15 16 17 |
# File 'lib/wave/voice.rb', line 11 def list(category: nil, language: nil) query = { "category" => category, "language" => language, } @client.request("GET", "/voice/voices", query: query) end |