Functions | Variables
mycroft.tts.cache_handler Namespace Reference

Functions

def copy_cache (cache_audio_dir)
 
def download_audio (cache_audio_dir, cache_text_file)
 
def generate_cache_text (cache_audio_dir, cache_text_file)
 
def main (cache_audio_dir)
 
def write_cache_text (cache_path, f)
 

Variables

list cache_dialog_path = [res_path, wifi_setup_path]
 
string MIMIC2_URL = 'https://mimic-api.mycroft.ai/synthesize?text='
 
 REGEX_SPL_CHARS = re.compile(r'[@#$%^*()<>/\|}{~:]')
 
 res_path
 
string TTS = 'Mimic2'
 
string wifi_setup_path = '/usr/local/mycroft/mycroft-wifi-setup/dialog/en-us'
 

Function Documentation

def mycroft.tts.cache_handler.copy_cache (   cache_audio_dir)
This method copies the cache from 'cache_audio_dir'
to TTS specific cache directory given by
get_cache_directory()
Args:
    cache_audio_dir (path): path containing .wav files

Definition at line 150 of file cache_handler.py.

def mycroft.tts.cache_handler.download_audio (   cache_audio_dir,
  cache_text_file 
)
This method takes the sentences from the text file generated
using generate_cache_text() and performs TTS inference on
mimic2-api. The wav files and phonemes are stored in
'cache_audio_dir'
Args:
    cache_audio_dir (path): path to store .wav files
    cache_text_file (file): file containing the sentences

Definition at line 94 of file cache_handler.py.

def mycroft.tts.cache_handler.generate_cache_text (   cache_audio_dir,
  cache_text_file 
)
This prepares a text file with all the sentences
from *.dialog files present in
mycroft/res/text/en-us and mycroft-wifi setup skill
Args:
    cache_audio_dir (path): path to store .wav files
    cache_text_file (file): file containing the sentences

Definition at line 48 of file cache_handler.py.

def mycroft.tts.cache_handler.main (   cache_audio_dir)

Definition at line 172 of file cache_handler.py.

def mycroft.tts.cache_handler.write_cache_text (   cache_path,
  f 
)

Definition at line 72 of file cache_handler.py.

Variable Documentation

list mycroft.tts.cache_handler.cache_dialog_path = [res_path, wifi_setup_path]

Definition at line 45 of file cache_handler.py.

string mycroft.tts.cache_handler.MIMIC2_URL = 'https://mimic-api.mycroft.ai/synthesize?text='

Definition at line 36 of file cache_handler.py.

mycroft.tts.cache_handler.REGEX_SPL_CHARS = re.compile(r'[@#$%^*()<>/\|}{~:]')

Definition at line 35 of file cache_handler.py.

mycroft.tts.cache_handler.res_path
Initial value:
1 = os.path.abspath(os.path.join(os.path.abspath(__file__), '..',
2  '..', 'res', 'text', 'en-us'))

Definition at line 42 of file cache_handler.py.

string mycroft.tts.cache_handler.TTS = 'Mimic2'

Definition at line 39 of file cache_handler.py.

string mycroft.tts.cache_handler.wifi_setup_path = '/usr/local/mycroft/mycroft-wifi-setup/dialog/en-us'

Definition at line 44 of file cache_handler.py.



mycroft_ros
Author(s):
autogenerated on Mon Apr 26 2021 02:35:41