Class: ChatgptAssistant::AudioSynthesis
- Inherits:
-
Object
- Object
- ChatgptAssistant::AudioSynthesis
- Defined in:
- lib/chatgpt_assistant/audio_synthesis.rb
Overview
This class is responsible for synthesize text to speech This class can work with IBM Cloud or AWS Polly for synthesize text into speech
Instance Method Summary collapse
-
#initialize(config) ⇒ AudioSynthesis
constructor
A new instance of AudioSynthesis.
- #synthesize_text(text) ⇒ Object
Constructor Details
#initialize(config) ⇒ AudioSynthesis
Returns a new instance of AudioSynthesis.
7 8 9 10 11 |
# File 'lib/chatgpt_assistant/audio_synthesis.rb', line 7 def initialize(config) @config = config @language = config.language classify_mode end |
Instance Method Details
#synthesize_text(text) ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/chatgpt_assistant/audio_synthesis.rb', line 13 def synthesize_text(text) @text = text if ibm_mode? synthesize_text_ibm elsif aws_mode? synthesize_text_aws elsif azure_mode? synthesize_text_azure end end |