def api_phonemes(): """Get phonemes and example words for a profile""" assert core is not None examples_path = core.profile.read_path( core.profile.get("text_to_speech.phoneme_examples", "phoneme_examples.txt")) # phoneme -> { word, phonemes } logger.debug("Loading phoneme examples from %s" % examples_path) examples_dict = load_phoneme_examples(examples_path) return jsonify(examples_dict)
def api_phonemes(): '''Get phonemes and example words for a profile''' assert core is not None examples_path = core.profile.read_path( core.profile.get('text_to_speech.phoneme_examples', 'phoneme_examples.txt')) # phoneme -> { word, phonemes } logger.debug('Loading phoneme examples from %s' % examples_path) examples_dict = load_phoneme_examples(examples_path) return jsonify(examples_dict)
def api_phonemes(): """Get phonemes and example words for a profile""" assert core is not None speech_system = core.profile.get("speech_to_text.system", "pocketsphinx") examples_path = Path( core.profile.read_path( core.profile.get( f"speech_to_text.{speech_system}.phoneme_examples", "phoneme_examples.txt", ))) # phoneme -> { word, phonemes } logger.debug("Loading phoneme examples from %s", examples_path) examples_dict = load_phoneme_examples(examples_path) return jsonify(examples_dict)