Team Ai
Apppublic

fighter-programmer/voicegen

sourceHugging Faceupdated 4y agoView on Hugging Face
0likes
__init__.cpython-37.pyc17 linesDownload Raw Back to __pycache__
1B

2��c��@s$dZddlmZdd�Zdd�ZdS)z+ from https://github.com/keithito/tacotron �)�cleanerscCsRdd�t|�D�}g}t||�}x,|D]$}||��kr8q&||}||g7}q&W|S)a*Converts a string of text to a sequence of IDs corresponding to the symbols in the text.3    Args:4      text: string to convert to a sequence5      cleaner_names: names of the cleaner functions to run the text through6    Returns:7      List of integers corresponding to the symbols in the text8  cSsi|]\}}||�qS�r)�.0�i�srr�D:\MoeGoeONNX\text\__init__.py�9<dictcomp>
sz$text_to_sequence.<locals>.<dictcomp>)�	enumerate�_clean_text�keys)�text�symbols�
cleaner_namesZ
_symbol_to_id�sequenceZ10clean_text�symbolZ	symbol_idrrr�text_to_sequences1112rcCs4x.|D]&}tt|�}|s$td|��||�}qW|S)NzUnknown cleaner: %s)�getattrr�	Exception)rr�nameZcleanerrrrr13s1415r16N)�__doc__rrrr17rrrr�<module>s