This repository contains Techmo TTS gRPC service API and client implementations.
Contents:
protoProtocol Buffers API definition.cppTechmo TTS gRPC client C++ implementation.pythonTechmo TTS gRPC client Python implementation.toolsUtilities. Scripts for dependencies installation.
Language-specific build instructions can be found in their respective directories.
Techmo TTS Service API is defined in proto/techmo_tts.proto file.
Service's SynthesizeStreaming and Synthesize methods accept SynthesizeRequest object which contains whole phrase to be synthesized.
The phrase has to be placed as a string in text field of SynthesizeRequest. The string has to be in orthographic form.
The input text can be either a plain text or SSML (https://w3.org/TR/speech-synthesis11/).
Currently the following SSML tags are supported:
<speak>- root xml node, with optionalxml:langattribute,<prosody>- supported attributes:pitch,range,rate, andvolume,<break>- supported attributes:strengthandtime,<emphasis>- supported attribute:level,<say-as>- supported attribute:interpret-as(consult Techmo TTS documentation for the complete list of all available implementations),<lang>- supported attribute:xml:lang,<voice>- supported attributes:name,gender, andage.
The SynthesizeConfig can be used to specify parameters of synthesis, like sampling rate, output encoding, language, default voice, etc.
SynthesizeRequest can be sent to the service via gRPC insecure channel (that does not require authentication).
SynthesizeStreaming returns synthesized audio in SynthesizeResponse as a stream and Synthesize returns the single response.
If the call has been successful, the response audio contains byte content that can be appended to received audio samples with sample_rate_hertz sampling frequency in hertz.
We provide sample TTS Client written in:
- C++ in
cpp(accepts text to be synthesized as a command line string), - Python in
python(accepts text to be synthesized as a command line string or as a content of given text file).
By default it saves"TechmoTTS.wav"file with received synthesized audio content. To use it, you have to specify provided by us service IP address and port using--service-addressoption with string in form "address:port".