from google.cloud import texttospeech

# Crear cliente de Google Text-to-Speech
client = texttospeech.TextToSpeechClient()

# Obtener las voces disponibles
voices = client.list_voices()

# Filtrar voces en español
for voice in voices.voices:
    for language_code in voice.language_codes:
        if 'es' in language_code:  # Filtrar solo voces en español
            print(f"Voice Name: {voice.name}")
            print(f"  Language Code: {language_code}")
            if hasattr(voice, 'ssml_genders'):
                for ssml_gender in voice.ssml_genders:
                    print(f"  SSML Gender: {ssml_gender}")
            else:
                print("  SSML Gender: No disponible")
