Merge pull request #5 from idiap/tokenizer-logging

Add tokenizer logging, update version for release 0.23.0
This commit is contained in:
Enno Hermann 2024-04-18 10:56:43 +02:00 committed by GitHub
commit 5527f70d68
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 3 deletions

View File

@ -26,9 +26,9 @@ ______________________________________________________________________
[![Discord](https://img.shields.io/discord/1037326658807533628?color=%239B59B6&label=chat%20on%20discord)](https://discord.gg/5eXr5seRrv)
[![License](<https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg>)](https://opensource.org/licenses/MPL-2.0)
[![PyPI version](https://badge.fury.io/py/TTS.svg)](https://badge.fury.io/py/TTS)
[![PyPI version](https://badge.fury.io/py/coqui-tts.svg)](https://badge.fury.io/py/coqui-tts)
[![Covenant](https://camo.githubusercontent.com/7d620efaa3eac1c5b060ece5d6aacfcc8b81a74a04d05cd0398689c01c4463bb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436f6e7472696275746f72253230436f76656e616e742d76322e3025323061646f707465642d6666363962342e737667)](https://github.com/idiap/coqui-ai-TTS/blob/main/CODE_OF_CONDUCT.md)
[![Downloads](https://pepy.tech/badge/tts)](https://pepy.tech/project/tts)
[![Downloads](https://pepy.tech/badge/coqui-tts)](https://pepy.tech/project/coqui-tts)
[![DOI](https://zenodo.org/badge/265612440.svg)](https://zenodo.org/badge/latestdoi/265612440)
![GithubActions](https://github.com/idiap/coqui-ai-TTS/actions/workflows/tests.yml/badge.svg)

View File

@ -1 +1 @@
0.22.1
0.23.0

View File

@ -107,10 +107,13 @@ class TTSTokenizer:
5. Text to token IDs
"""
# TODO: text cleaner should pick the right routine based on the language
logger.debug("Tokenizer input text: %s", text)
if self.text_cleaner is not None:
text = self.text_cleaner(text)
logger.debug("Cleaned text: %s", text)
if self.use_phonemes:
text = self.phonemizer.phonemize(text, separator="", language=language)
logger.debug("Phonemes: %s", text)
text = self.encode(text)
if self.add_blank:
text = self.intersperse_blank_char(text, True)