mirror of
https://github.com/malarinv/jasper-asr.git
synced 2026-03-10 03:12:34 +00:00
1. integrated data generator using google tts
2. added training script
This commit is contained in:
26
jasper/data_utils/tts/ttsclient.py
Normal file
26
jasper/data_utils/tts/ttsclient.py
Normal file
@@ -0,0 +1,26 @@
|
||||
"""
|
||||
TTSClient Abstract Class
|
||||
"""
|
||||
from abc import ABC, abstractmethod
|
||||
|
||||
|
||||
class TTSClient(ABC):
|
||||
"""
|
||||
Base class for TTS
|
||||
"""
|
||||
|
||||
@abstractmethod
|
||||
def text_to_speech(self, text: str, num_channels: int, sample_rate: int,
|
||||
audio_encoding) -> bytes:
|
||||
"""
|
||||
convert text to bytes
|
||||
|
||||
Arguments:
|
||||
text {[type]} -- text to convert
|
||||
channel {[type]} -- output audio bytes channel setting
|
||||
width {[type]} -- width of audio bytes
|
||||
rate {[type]} -- rare for audio bytes
|
||||
|
||||
Returns:
|
||||
[type] -- [description]
|
||||
"""
|
||||
Reference in New Issue
Block a user