Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 106143

Tutorial: “TTS-Piper” change language in automation and send output to another device

$
0
0

The automation enables the output on a tablet with fully kiosk (media_player_entity_id: media_player.fire8_2). i have extracted the language list from https://huggingface.co/rhasspy/piper-voices/resolve/v1.0.0/voices.json. the language to be used can be selected: (selected_index: 15). when a language is used for the first time, it is downloaded automatically, which takes some time.
Procedure:
-install piper add on
-new automation
-ymal mode
-insert code

alias: Demo TTS mit variabler Stimme
description: TTS Auswahl per Index aus einer Liste
triggers: []
actions:
  - target:
      entity_id: tts.piper
    data:
      cache: false
      media_player_entity_id: media_player.fire8_2
      options:
        voice: "{{ voice_list[selected_index].split(': ')[1] }}"
      message: Guten Tag und Hallo!
    action: tts.speak
variables:
  voice_list:
    - "0: ar_JO-kareem-low"
    - "1: ar_JO-kareem-medium"
    - "2: ca_ES-upc_ona-medium"
    - "3: ca_ES-upc_ona-x_low"
    - "4: ca_ES-upc_pau-x_low"
    - "5: cs_CZ-jirka-low"
    - "6: cs_CZ-jirka-medium"
    - "7: cy_GB-gwryw_gogleddol-medium"
    - "8: da_DK-talesyntese-medium"
    - "9: de_DE-eva_k-x_low"
    - "10: de_DE-karlsson-low"
    - "11: de_DE-kerstin-low"
    - "12: de_DE-mls-medium"
    - "13: de_DE-pavoque-low"
    - "14: de_DE-ramona-low"
    - "15: de_DE-thorsten-high"
    - "16: de_DE-thorsten-low"
    - "17: de_DE-thorsten-medium"
    - "18: de_DE-thorsten_emotional-medium"
    - "19: el_GR-rapunzelina-low"
    - "20: en_GB-alan-low"
    - "21: en_GB-alan-medium"
    - "22: en_GB-alba-medium"
    - "23: en_GB-aru-medium"
    - "24: en_GB-cori-high"
    - "25: en_GB-cori-medium"
    - "26: en_GB-jenny_dioco-medium"
    - "27: en_GB-northern_english_male-medium"
    - "28: en_GB-semaine-medium"
    - "29: en_GB-southern_english_female-low"
    - "30: en_GB-vctk-medium"
    - "31: en_US-amy-low"
    - "32: en_US-amy-medium"
    - "33: en_US-arctic-medium"
    - "34: en_US-bryce-medium"
    - "35: en_US-danny-low"
    - "36: en_US-hfc_female-medium"
    - "37: en_US-hfc_male-medium"
    - "38: en_US-joe-medium"
    - "39: en_US-john-medium"
    - "40: en_US-kathleen-low"
    - "41: en_US-kristin-medium"
    - "42: en_US-kusal-medium"
    - "43: en_US-l2arctic-medium"
    - "44: en_US-lessac-high"
    - "45: en_US-lessac-low"
    - "46: en_US-lessac-medium"
    - "47: en_US-libritts-high"
    - "48: en_US-libritts_r-medium"
    - "49: en_US-ljspeech-high"
    - "50: en_US-ljspeech-medium"
    - "51: en_US-norman-medium"
    - "52: en_US-ryan-high"
    - "53: en_US-ryan-low"
    - "54: en_US-ryan-medium"
    - "55: es_ES-carlfm-x_low"
    - "56: es_ES-davefx-medium"
    - "57: es_ES-mls_10246-low"
    - "58: es_ES-mls_9972-low"
    - "59: es_ES-sharvard-medium"
    - "60: es_MX-ald-medium"
    - "61: es_MX-claude-high"
    - "62: fa_IR-amir-medium"
    - "63: fa_IR-gyro-medium"
    - "64: fi_FI-harri-low"
    - "65: fi_FI-harri-medium"
    - "66: fr_FR-gilles-low"
    - "67: fr_FR-mls-medium"
    - "68: fr_FR-mls_1840-low"
    - "69: fr_FR-siwis-low"
    - "70: fr_FR-siwis-medium"
    - "71: fr_FR-tom-medium"
    - "72: fr_FR-upmc-medium"
    - "73: hu_HU-anna-medium"
    - "74: hu_HU-berta-medium"
    - "75: hu_HU-imre-medium"
    - "76: is_IS-bui-medium"
    - "77: is_IS-salka-medium"
    - "78: is_IS-steinn-medium"
    - "79: is_IS-ugla-medium"
    - "80: it_IT-paola-medium"
    - "81: it_IT-riccardo-x_low"
    - "82: ka_GE-natia-medium"
    - "83: kk_KZ-iseke-x_low"
    - "84: kk_KZ-issai-high"
    - "85: kk_KZ-raya-x_low"
    - "86: lb_LU-marylux-medium"
    - "87: ne_NP-google-medium"
    - "88: ne_NP-google-x_low"
    - "89: nl_BE-nathalie-medium"
    - "90: nl_BE-nathalie-x_low"
    - "91: nl_BE-rdh-medium"
    - "92: nl_BE-rdh-x_low"
    - "93: nl_NL-mls-medium"
    - "94: nl_NL-mls_5809-low"
    - "95: nl_NL-mls_7432-low"
    - "96: no_NO-talesyntese-medium"
    - "97: pl_PL-darkman-medium"
    - "98: pl_PL-gosia-medium"
    - "99: pl_PL-mc_speech-medium"
    - "100: pl_PL-mls_6892-low"
    - "101: pt_BR-edresson-low"
    - "102: pt_BR-faber-medium"
    - "103: pt_PT-tugão-medium"
    - "104: ro_RO-mihai-medium"
    - "105: ru_RU-denis-medium"
    - "106: ru_RU-dmitri-medium"
    - "107: ru_RU-irina-medium"
    - "108: ru_RU-ruslan-medium"
    - "109: sk_SK-lili-medium"
    - "110: sl_SI-artur-medium"
    - "111: sr_RS-serbski_institut-medium"
    - "112: sv_SE-nst-medium"
    - "113: sw_CD-lanfrica-medium"
    - "114: tr_TR-dfki-medium"
    - "115: tr_TR-fahrettin-medium"
    - "116: tr_TR-fettah-medium"
    - "117: uk_UA-lada-x_low"
    - "118: uk_UA-ukrainian_tts-medium"
    - "119: vi_VN-25hours_single-low"
    - "120: vi_VN-vais1000-medium"
    - "121: vi_VN-vivos-x_low"
    - "122: zh_CN-huayan-medium"
    - "123: zh_CN-huayan-x_low"
  selected_index: 15
mode: single

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 106143

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>