"""
tts_personality.launch.py — Launch the TTS personality engine

Usage
-----
  ros2 launch saltybot_tts_personality tts_personality.launch.py

Note: Requires saltybot_tts_service to be running for actual TTS synthesis.
"""

import os
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import Node


def generate_launch_description():
    pkg_share = get_package_share_directory("saltybot_tts_personality")
    default_params = os.path.join(pkg_share, "config", "tts_personality_params.yaml")

    return LaunchDescription([
        DeclareLaunchArgument(
            "params_file",
            default_value=default_params,
            description="Path to tts_personality_params.yaml",
        ),
        DeclareLaunchArgument(
            "personality_name",
            default_value="Luna",
            description="Personality name/identity",
        ),
        Node(
            package="saltybot_tts_personality",
            executable="tts_personality_node",
            name="tts_personality",
            output="screen",
            parameters=[
                LaunchConfiguration("params_file"),
                {
                    "personality_name": LaunchConfiguration("personality_name"),
                },
            ],
        ),
    ])
