Public Member Functions | Static Public Attributes | Private Member Functions
rospeex_core.ss.nict.Client Class Reference
Inheritance diagram for rospeex_core.ss.nict.Client:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __init__
def request

Static Public Attributes

string FORMAT = 'x-wav'
list LANGUAGES = ['ja', 'en', 'zh', 'ko', 'id', 'my', 'th', 'vi']
string URL = 'http://rospeex.nict.go.jp/nauth_json/jsServices/VoiceTraSS'
dictionary VOICEFONT_DICT

Private Member Functions

def _check_decorded_data
def _check_voice_font
def _request_tts

Detailed Description

SpeechSynthesisCient_NICT class 

Definition at line 21 of file nict.py.


Constructor & Destructor Documentation

initialize function 

Definition at line 38 of file nict.py.


Member Function Documentation

def rospeex_core.ss.nict.Client._check_decorded_data (   self,
  decorded_data 
) [private]
@param decorded_data:
@type  decorded_data:
@return: True to success / False to failture
@rtype: bool
@raise InvalidResponseException:

Definition at line 110 of file nict.py.

def rospeex_core.ss.nict.Client._check_voice_font (   self,
  voice_font,
  language 
) [private]
check voice font
@param voice_font:
@type  voice_font:
@param language:
@type  language:
@raise ParameterException

Definition at line 94 of file nict.py.

def rospeex_core.ss.nict.Client._request_tts (   self,
  message,
  language,
  voice_font,
  timeout 
) [private]
request tts to NICT server
@param message: message
@type  message: str
@param language: speech synthesis language
@type  language: str
@param voice_font: taraget voice font
@type  voice_font: str
@param timeout: request timeout time (second)
@type  timeout: float
@return: voice data (wav format binary)
@rtype: str
@raise InvalidRequestException: send invalid request.
@raise InvalidResponseException: server error.
@raise RequestTimeoutException: timeout error.

Definition at line 144 of file nict.py.

def rospeex_core.ss.nict.Client.request (   self,
  message,
  language = 'ja',
  voice_font = '*',
  timeout = socket._GLOBAL_DEFAULT_TIMEOUT 
)
Send speech synthesis request to server,
and get speech synthesis result.
@param message: message
@type  message: str
@param language: speech synthesis language
@type  language: str
@param voice_font: taraget voice font
@type  voice_font: str
@param timeout: request timeout time (second)
@type  timeout: float
@return: voice data (wav format binary)
@rtype: str
@raise InvalidResponseException:
@raise InvalidRequestException: send invalid request.
@raise InvalidResponseException: server error.
@raise RequestTimeoutException: timeout error.

Reimplemented from rospeex_core.ss.base.IClient.

Definition at line 43 of file nict.py.


Member Data Documentation

string rospeex_core::ss::nict.Client::FORMAT = 'x-wav' [static]

Definition at line 24 of file nict.py.

list rospeex_core::ss::nict.Client::LANGUAGES = ['ja', 'en', 'zh', 'ko', 'id', 'my', 'th', 'vi'] [static]

Definition at line 25 of file nict.py.

string rospeex_core::ss::nict.Client::URL = 'http://rospeex.nict.go.jp/nauth_json/jsServices/VoiceTraSS' [static]

Definition at line 23 of file nict.py.

Initial value:
{
        'ja': ['F128', 'F117', '*'],
        'en': ['EF007', '*'],
        'zh': ['CJF101', '*'],
        'ko': ['KF001', '*'],
        'zh': ['CJF101', '*'],
        'id': ['*'],
        'my': ['*'],
        'th': ['*'],
        'vi': ['*']
    }

Definition at line 26 of file nict.py.


The documentation for this class was generated from the following file:


rospeex_core
Author(s): Komei Sugiura
autogenerated on Thu Jun 6 2019 18:53:10