2025/09/04

구글 TTS AI 음성 사용



설정/기기 및 서비스/통합구성요소 추가하기/Google/Google Cloud 추가

설정/음성 어시스턴트/구글 항목을 추가로 만들면 아래 텍스트 음성 변환의 목소리항목에서 다양한 AI 음성을 음성테스트로 들어 볼 수 있음.

ko-KR-Chirp3-HD로 시작하는 것들이 고음질 AI음성이고 Neural, Standard, Wavenet은 기존 음성들임.

TTS 실행전 폰으로 알림 보내고 짧은 효과음을 실행한 후 선택한 AI 음성으로 메세지를 읽는 템플릿 스크립트를 만들어 자동화에 사용. 


scripts.yaml
tts_notify:
  fields:
    message:
      required: true
      selector:
        text:
  sequence:
  - action: notify.mobile_app_phone
    continue_on_error: true
    data:
      message: '{{ message }}'
      data:
        priority: high
        channel: alarm
    - action: media_player.play_media
      data:
        media_content_id: media-source://media_source/local/sound/noti3.mp3
        media_content_type: audio/mpeg
        entity_id: media_player.notify
    - wait_template: "{{ is_state('media_player.notify', 'idle') }}"
      timeout: '00:00:10'
    - action: tts.speak
      target:
        entity_id: tts.google_cloud
      data:
        media_player_entity_id: media_player.notify
        message: '{{ message }}'
        options:
          voice: ko-KR-Chirp3-HD-Vindemiatrix
#        voice: ko-KR-Chirp3-HD-Autonoe
#        voice: ko-KR-Chirp3-HD-Kore
#        voice: ko-KR-Chirp3-HD-Zephyr


automations.yaml
- id: 알림-가습기물부족
  alias: 알림-가습기물부족 
  triggers:
    - trigger: state
      entity_id: binary_sensor.water_level
      from: 'off'
      to: 'on'
      for: '00:00:30'
  conditions:
    - condition: state
      entity_id: binary_sensor.winter_season
      state: 'on'
    - condition: time
      after: '07:00'
      before: '23:00'
  actions:
    - action: script.tts_notify
      data:
        message: 가습기 물보충 해주세요.