module Ivona::AdditionalInfo

Public Class Methods

check_text_price(voice_id, text) click to toggle source

Check the characters price for a specified speech parameters (text and voice pair)

# File lib/ivona/additional_information.rb, line 4
def check_text_price(voice_id, text)
  token  = Ivona::Auth.get_token
  md5    = Ivona::GetMd5.formula(token)
  params = [  "token=#{token}",
              "md5=#{md5}",
              "text=#{text}", 
              "voiceId=#{voice_id}"  ]
  params = params.join('&')
  HTTParty.get("#{BASE_URL}/textprice?#{params}")
end
get_user_agreement_data() click to toggle source

Show user TTS SaaS agreement data (this method will result in an error if there isn’t a SaaS agreement currently active for user)

# File lib/ivona/additional_information.rb, line 16
def get_user_agreement_data
  token  = Ivona::Auth.get_token
  md5    = Ivona::GetMd5.formula(token)
  params = [  "token=#{token}",
              "md5=#{md5}"  ]
  params = params.join('&')
  HTTParty.get("#{BASE_URL}/agreementdata?#{params}")
end
get_voice_data( voice_id ) click to toggle source

Get single voice data

# File lib/ivona/additional_information.rb, line 36
def get_voice_data( voice_id )
  token  = Ivona::Auth.get_token
  md5    = Ivona::GetMd5.formula(token)
  params = [  "token=#{token}",
              "md5=#{md5}"  ]
  params = params.join('&')
  HTTParty.get("#{BASE_URL}/voices/#{voice_id}?#{params}")
end
list_codecs() click to toggle source

Get all available codecs list

# File lib/ivona/additional_information.rb, line 46
def list_codecs
  token  = Ivona::Auth.get_token
  params = [  "token=#{token}",
              "md5=#{Ivona::GetMd5.formula(token)}"  ]
  params = params.join('&')
  HTTParty.get("#{BASE_URL}/codecs?#{params}")
end
list_voices() click to toggle source

Get all available voices list

# File lib/ivona/additional_information.rb, line 26
def list_voices
  token  = Ivona::Auth.get_token
  md5    = Ivona::GetMd5.formula(token)
  params = [  "token=#{token}",
              "md5=#{md5}"  ]
  params = params.join('&')
  HTTParty.get("#{BASE_URL}/voices?#{params}")
end