Text-to-Speech Gemini-TTS는 자연스러움을 넘어 텍스트 기반 프롬프트를 사용하여 생성된 오디오를 세부적으로 제어할 수 있도록 지원하는 최신 버전의 Text-to-Speech 기술입니다. Gemini-TTS를 사용하면 짧은 스니펫부터 긴 내러티브까지 음성을 합성할 수 있으며, 자연어 프롬프트를 통해 스타일, 억양, 속도, 어조, 감정 표현까지 정확하게 지정할 수 있습니다.
Gemini-TTS 기능은 다음에서 지원됩니다.
gemini-2.5-flash-preview-tts
: Gemini 2.5 Flash 프리뷰는 비용 효율적인 일상 애플리케이션에 적합합니다.gemini-2.5-pro-preview-tts
: Gemini 2.5 Pro 미리보기는 제어 가능한 음성 생성 (TTS)과 최첨단 품질의 복잡한 프롬프트에 적합합니다.
모델 | 최적화 목표 | 입력 모달리티 | 출력 모달리티 | 발화자 1명 |
---|---|---|---|---|
Gemini 2.5 Flash 미리보기 TTS | 비용 효율적인 일상적인 애플리케이션을 위한 제어 가능한 짧은 지연 시간의 단일 및 다중 스피커 텍스트 음성 변환 오디오 생성 | 텍스트 | 오디오 | ✔️ |
Gemini 2.5 Pro 미리보기 TTS | 팟캐스트 생성, 오디오북, 고객 지원 등 구조화된 워크플로를 위한 높은 제어력 | 텍스트 | 오디오 | ✔️ |
추가 제어 및 기능에는 다음이 포함됩니다.
자연스러운 대화: 뛰어난 품질의 음성 상호작용, 더 적절한 표현력, 운율 (리듬 패턴)이 매우 짧은 지연 시간으로 제공되므로 유연하게 대화할 수 있습니다.
스타일 제어: 자연어 프롬프트를 사용하여 특정 억양을 채택하고 속삭임을 비롯한 다양한 어조와 표현을 생성하도록 대화 내 전달을 조정할 수 있습니다.
동적 성능: 이 모델은 시, 뉴스, 흥미로운 스토리텔링을 표현력 있게 읽어 텍스트에 생기를 불어넣을 수 있습니다. 또한 요청 시 특정 감정으로 연기하고 억양을 낼 수 있습니다.
향상된 속도 및 발음 제어: 전달 속도를 제어하면 특정 단어를 비롯한 발음의 정확성을 높일 수 있습니다.
예시
model: "gemini-2.5-pro-preview-tts" prompt: "You are having a casual conversation with a friend. Say the following in a friendly and amused way." text: "hahah I did NOT expect that. Can you believe it!." speaker: "Callirhoe"
model: "gemini-2.5-flash-preview-tts" prompt: "Say the following in a curious way" text: "OK, so... tell me about this [uhm] AI thing.", speaker: "Orus"
model: "gemini-2.5-flash-preview-tts" prompt: "Say the following" text: "[extremely fast] Availability and terms may vary. Check our website or your local store for complete details and restrictions." speaker: "Kore"
이러한 음성을 프로그래매틱 방식으로 사용하는 방법에 관한 자세한 내용은 Gemini-TTS 사용 섹션을 참고하세요.
음성 옵션
Gemini-TTS는 기존 Chirp 3: HD 음성과 유사한 다양한 음성 옵션을 제공하며, 각 음성에는 고유한 특성이 있습니다.
이름 | 성별 | 데모 |
---|---|---|
Achernar | 여성 | |
Achird | 남성 | |
Algenib | 남성 | |
Algieba | 남성 | |
Alnilam | 남성 | |
Aoede | 여성 | |
Autonoe | 여성 | |
Callirrhoe | 여성 | |
카론 | 남성 | |
Despina | 여성 | |
Enceladus | 남성 | |
Erinome | 여성 | |
Fenrir | 남성 | |
Gacrux | 여성 | |
Iapetus | 남성 | |
Kore | 여성 | |
Laomedeia | 여성 | |
Leda | 여성 | |
Orus | 남성 | |
Pulcherrima | 여성 | |
Puck | 남성 | |
Rasalgethi | 남성 | |
Sadachbia | 남성 | |
Sadaltager | 남성 | |
Schedar | 남성 | |
Sulafat | 여성 | |
Umbriel | 남성 | |
Vindemiatrix | 여성 | |
Zephyr | 여성 | |
Zubenelgenubi | 남성 |
지원 언어
Gemini-TTS는 기존 Chirp 3: HD 음성과 유사한 다양한 음성 옵션을 제공하며, 각 음성에는 고유한 특성이 있습니다.
언어 | BCP-47 코드 |
---|---|
영어(미국) | en-US |
사용 가능한 리전
Gemini-TTS 모델은 다음 Google Cloud 지역에서 각각 사용할 수 있습니다.
Google Cloud 구간 | 출시 준비 |
---|---|
us |
공개 프리뷰 |
지원되는 출력 형식
기본 응답 형식은 LINEAR16
입니다. 지원되는 기타 형식은 다음과 같습니다.
API 메서드 | 형식 |
---|---|
batch |
ALAW, MULAW, MP3, OGG_OPUS, PCM |
Gemini-TTS 사용
Gemini-TTS 모델을 사용하여 단일 화자 음성을 합성하는 방법을 알아봅니다.
동기 음성 합성 요청 수행
Python
# google-cloud-texttospeech minimum version 2.29.0 is required.
import os
from google.cloud import texttospeech
PROJECT_ID = os.getenv("GOOGLE_CLOUD_PROJECT")
def synthesize(prompt: str, text: str, model_name: str, output_filepath: str = "output.mp3"):
"""Synthesizes speech from the input text and saves it to an MP3 file.
Args:
prompt: Stylisting instructions on how to synthesize the content in
the text field.
text: The text to synthesize.
model_name: Gemini model to use. Currently, the available models are
gemini-2.5-flash-preview-tts and gemini-2.5-pro-preview-tts
output_filepath: The path to save the generated audio file.
Defaults to "output.mp3".
"""
client = texttospeech.TextToSpeechClient()
synthesis_input = texttospeech.SynthesisInput(text=text, prompt=prompt)
# Select the voice you want to use.
voice = texttospeech.VoiceSelectionParams(
language_code="en-US",
name="Charon", # Example voice, adjust as needed
model_name=model_name
)
audio_config = texttospeech.AudioConfig(
audio_encoding=texttospeech.AudioEncoding.MP3
)
# Perform the text-to-speech request on the text input with the selected
# voice parameters and audio file type.
response = client.synthesize_speech(
input=synthesis_input, voice=voice, audio_config=audio_config
)
# The response's audio_content is binary.
with open(output_filepath, "wb") as out:
out.write(response.audio_content)
print(f"Audio content written to file: {output_filepath}")
CURL
# Make sure to install gcloud cli, and sign in to your project.
# Make sure to use your PROJECT_ID value.
# Currently, the available models are gemini-2.5-flash-preview-tts and gemini-2.5-pro-preview-tts
# To parse the JSON output and use it directly see the last line of the command.
# Requires JQ and ffplay library to be installed.
PROJECT_ID=YOUR_PROJECT_ID
curl -X POST \
-H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \
-H "x-goog-user-project: $PROJECT_ID" \
-H "Content-Type: application/json" \
-d '{
"input": {
"prompt": "Say the following in a curious way",
"text": "OK, so... tell me about this [uhm] AI thing."
},
"voice": {
"languageCode": "en-us",
"name": "Kore",
"model_name": "gemini-2.5-flash-preview-tts"
},
"audioConfig": {
"audioEncoding": "LINEAR16"
}
}' \
"https://texttospeech.googleapis.com/v1/text:synthesize" \
| jq -r '.audioContent' | base64 -d | ffplay - -autoexit