Class: TTSClient

itri-tts-async~TTSClient(account, password)

new TTSClient(account, password)

Main class to operate TTS Web service
Parameters:
Name Type Description
account string account of TTS Web service
password string password of TTS Web service
Source:

Methods

(async) ConvertAdvancedText(text, opt) → {Promise.<TTSResult>}

Convert text use advanced option.
Parameters:
Name Type Description
text string text want to convert
opt object advanced option.
Properties:
Name Type Description
opt.TTSSpeaker string @see TTSSpeaker
opt.volume number The range is 0~100, the default value is 100.
opt.speed number The range is -10~10, the default value is 0.
opt.outType string Output format (wav, flv).
opt.PitchLevel number Pitch, the range is -10~10, default value is 0.
opt.PitchSign number 0=normal, 1=like robot, 2=speak Chinese like foreigners.
opt.PitchScale number Intonation, the range is 0~20, default value is 5.
Source:
Returns:
Type
Promise.<TTSResult>

(async) ConvertSimple(text) → {Promise.<TTSResult>}

Convert text use default option.
Parameters:
Name Type Description
text string text want to convert
Source:
Returns:
Type
Promise.<TTSResult>

(async) ConvertText(text, opt) → {Promise.<TTSResult>}

Convert text use normal option.
Parameters:
Name Type Description
text string text want to convert
opt object normal option.
Properties:
Name Type Description
opt.TTSSpeaker string @see TTSSpeaker
opt.volume number The range is 0~100, the default value is 100.
opt.speed number The range is -10~10, the default value is 0.
opt.outType string Output format (wav, flv).
Source:
Returns:
Type
Promise.<TTSResult>

(async) GetConvertStatus() → {Promise.<TTSStatus>}

Get convert status based on given convert ID
Source:
Returns:
Type
Promise.<TTSStatus>