Class: Azure::TTS::Configuration
- Inherits:
-
Object
- Object
- Azure::TTS::Configuration
- Includes:
- Constants
- Defined in:
- lib/azure/tts/configuration.rb
Constant Summary
Constants included from Constants
Azure::TTS::Constants::AUDIO_FORMATS, Azure::TTS::Constants::REGIONS, Azure::TTS::Constants::TOKENS_URL, Azure::TTS::Constants::TTS_URL, Azure::TTS::Constants::VOICES_URL
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#default_audio_format ⇒ Object
Returns the value of attribute default_audio_format.
-
#default_voice ⇒ Object
Returns the value of attribute default_voice.
-
#region ⇒ Object
Returns the value of attribute region.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #tokens_url ⇒ Object
- #tts_url ⇒ Object
- #voices_url ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
10 11 12 13 |
# File 'lib/azure/tts/configuration.rb', line 10 def initialize @default_voice = "" @default_audio_format = :audio_24khz_160kbitrate_mono_mp3 end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
8 9 10 |
# File 'lib/azure/tts/configuration.rb', line 8 def api_key @api_key end |
#default_audio_format ⇒ Object
Returns the value of attribute default_audio_format.
8 9 10 |
# File 'lib/azure/tts/configuration.rb', line 8 def default_audio_format @default_audio_format end |
#default_voice ⇒ Object
Returns the value of attribute default_voice.
8 9 10 |
# File 'lib/azure/tts/configuration.rb', line 8 def default_voice @default_voice end |
#region ⇒ Object
Returns the value of attribute region.
8 9 10 |
# File 'lib/azure/tts/configuration.rb', line 8 def region @region end |
Instance Method Details
#tokens_url ⇒ Object
15 16 17 |
# File 'lib/azure/tts/configuration.rb', line 15 def tokens_url format(TOKENS_URL, region: region) end |
#tts_url ⇒ Object
23 24 25 |
# File 'lib/azure/tts/configuration.rb', line 23 def tts_url format(TTS_URL, region: region) end |
#voices_url ⇒ Object
19 20 21 |
# File 'lib/azure/tts/configuration.rb', line 19 def voices_url format(VOICES_URL, region: region) end |