All Projects → sovaai → sova-tts-tps

sovaai / sova-tts-tps

Licence: Apache-2.0 license
NLP-preprocessor for the SOVA-TTS project

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to sova-tts-tps

python-mecab
A repository to bind mecab for Python 3.5+. Not using swig nor pybind. (Not Maintained Now)
Stars: ✭ 27 (-38.64%)
Mutual labels:  text-processing
Cross-Speaker-Emotion-Transfer
PyTorch Implementation of ByteDance's Cross-speaker Emotion Transfer Based on Speaker Condition Layer Normalization and Semi-Supervised Training in Text-To-Speech
Stars: ✭ 107 (+143.18%)
Mutual labels:  speech-synthesis
knime-textprocessing
KNIME - Text Processing Extension (Labs)
Stars: ✭ 17 (-61.36%)
Mutual labels:  text-processing
Khronos
The open source intelligent personal assistant
Stars: ✭ 25 (-43.18%)
Mutual labels:  speech-synthesis
TensorVox
Desktop application for neural speech synthesis written in C++
Stars: ✭ 140 (+218.18%)
Mutual labels:  speech-synthesis
learn perl oneliners
Example based guide for text processing with perl from the command line
Stars: ✭ 63 (+43.18%)
Mutual labels:  text-processing
Expressive-FastSpeech2
PyTorch Implementation of Non-autoregressive Expressive (emotional, conversational) TTS based on FastSpeech2, supporting English, Korean, and your own languages.
Stars: ✭ 139 (+215.91%)
Mutual labels:  speech-synthesis
QPPWG
Quasi-Periodic Parallel WaveGAN Pytorch implementation
Stars: ✭ 41 (-6.82%)
Mutual labels:  speech-synthesis
Zero-Shot-TTS
Unofficial Implementation of Zero-Shot Text-to-Speech for Text-Based Insertion in Audio Narration
Stars: ✭ 33 (-25%)
Mutual labels:  speech-synthesis
AmazonSpeechTranslator
End-to-end Solution for Speech Recognition, Text Translation, and Text-to-Speech for iOS using Amazon Translate and Amazon Polly as AWS Machine Learning managed services.
Stars: ✭ 50 (+13.64%)
Mutual labels:  speech-synthesis
StyleSpeech
Official implementation of Meta-StyleSpeech and StyleSpeech
Stars: ✭ 161 (+265.91%)
Mutual labels:  speech-synthesis
s3-utils
Utilities and tools based around Amazon S3 to provide convenience APIs in a CLI
Stars: ✭ 45 (+2.27%)
Mutual labels:  text-processing
speechrec
a simple speech recognition app using the Web Speech API Interfaces
Stars: ✭ 18 (-59.09%)
Mutual labels:  speech-synthesis
SingleVC
Any-to-one voice conversion using the data augment strategy: pitch shifted and duration remained.
Stars: ✭ 25 (-43.18%)
Mutual labels:  speech-synthesis
ml-with-audio
HF's ML for Audio study group
Stars: ✭ 104 (+136.36%)
Mutual labels:  speech-synthesis
web-speech-cognitive-services
Polyfill Web Speech API with Cognitive Services Bing Speech for both speech-to-text and text-to-speech service.
Stars: ✭ 35 (-20.45%)
Mutual labels:  speech-synthesis
MediumVC
Any-to-any voice conversion using synthetic specific-speaker speeches as intermedium features
Stars: ✭ 46 (+4.55%)
Mutual labels:  speech-synthesis
deduce
Deduce: de-identification method for Dutch medical text
Stars: ✭ 40 (-9.09%)
Mutual labels:  text-processing
VAENAR-TTS
PyTorch Implementation of VAENAR-TTS: Variational Auto-Encoder based Non-AutoRegressive Text-to-Speech Synthesis.
Stars: ✭ 66 (+50%)
Mutual labels:  speech-synthesis
few-shot-transformer-tts
Byte-based multilingual transformer TTS for low-resource/few-shot language adaptation.
Stars: ✭ 60 (+36.36%)
Mutual labels:  speech-synthesis

Text processing for speech synthesis

This package was created in order to construct, on a modular basis, the text processors necessary to obtain a text prepared for submission to speech synthesis systems. At the moment, only Russian and English languages are supported. There is only basic support for English (see Basic functionality); following modules modules are implemented for Russian:

The project has the potential for expansion with other modules (g2p, normalizer) and languages.

How to use

Modules

Let us say you need to stress words in some text. You need stress setting module (Emphasizer) to complete this task:

from tps import download
from tps.data import find
from tps.modules import Emphasizer


try:
    stress_dict = find("stress.dict", raise_exception=True)
except FileNotFoundError:
    stress_dict = download("stress.dict")

emphasizer = Emphasizer("ru", (stress_dict, "plane"))
text = "Привет, мир! Смотри, как я умею ставить ударения в словах."
emphasizer.process_text(text)

results in

'Привет, м+ир! Смотри, как я ум+ею ставить удар+ения в слов+ах.'

Since this module is case sensitive, you get a different result if you lowercase the text:

emphasizer.process_text(text.lower())

results in

'прив+ет, м+ир! смотри, как я ум+ею ставить удар+ения в слов+ах.'

Handler

Let us say you need to prepare a text for transfer to the speech synthesis system. There are two possible scenarios for you.

Basic functionality

Let us say you already have a cleaned up and marked up text for training synthesis system. In this case, you only need the basic functionality of the Handler class, such as:

  • storing a fixed symbolic dictionary
  • conversion to lower case
  • obtaining vectors of sentences based on a symbolic dictionary
  • getting suggestions from vectors
  • some additional cleaning

In that case the following code is enough

from tps import Handler

handler = Handler("ru")
text = "В чащах юга жил бы цитрус? Да, но фальшивый экземпляр!"

result = handler.process_text(text, keep_delimiters=False)
print(result)
'в чащах юга жил бы цитрус? да, но фальшивый экземпляр!'
vector = handler.text2vec(result)
print(vector)
[16, 12, 38, 14, 40, 14, 36, 12, 45, 17, 14, 12, 21, 23, 26, 12, 15, 42, 12, 37, 23, 33, 31, 34, 32, 4, 12, 18, 14, 9, 12, 28, 29, 12, 35, 14, 26, 43, 39, 23, 16, 42, 24, 12, 44, 25, 22, 19, 27, 30, 26, 46, 31, 3]

Connecting modules

In case you need to prepare text for inference, you may need to connect various modules that improve the text sent for synthesis. For Russian language just use from_charset method of Handler class (silent=True allows loading in automatic mode the data required for the modules to work):

from tps import Handler

handler = Handler.from_charset("ru", silent=True)
text = "В чащах юга жил бы цитрус? Да, но фальшивый экземпляр!"

result = handler.process_text(text, keep_delimiters=False)
print(result)
в ч+ащах +юга ж+ил бы ц+итрус? да, но фальш+ивый экземпл+яр!

or, if you need to preserve delimiters:

result = handler.process_text(text, keep_delimiters=True)
print(result)
['в ч+ащах +юга ж+ил бы ц+итрус?', <Pause.eos: 500ms>, 'да, но фальш+ивый экземпл+яр!']

also there is possibility to pass the user dictionary and necessary cleaner functions (including custom ones)

text = "TTS     -    это     увлекательно."
user_dict = {"tts": "синтез речи"}

result = handler.process_text(text, cleaners="light_punctuation_cleaners", user_dict=user_dict, keep_delimiters=False)
'с+интэз р+ечи — +это увлек+ательно.'

In case you want to link your other modules with the handler, then do this when initializing the class instance

handler = Handler("ru", modules=some_modules_list)

How to add new module

The most important thing when creating a new module is to remember that it must inherit from the Processor class in order to have a consistent interface with other modules.

How to add new language

The key folder when adding a new language or a new character set is folder symbols. If you add a new language, create a file with the name of the language inside, and then do it by analogy with the existing languages.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].