> ## Documentation Index
> Fetch the complete documentation index at: https://typecast.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 음성 생성

> CLI로 음성을 생성하고 음성, 모델, 감정, 출력 파일을 제어합니다.

## 기능 맵

| 필요               | 사용                                                         |
| ---------------- | ---------------------------------------------------------- |
| 즉시 로컬 재생         | `cast "text"`                                              |
| 재사용 가능한 오디오 파일   | `--out file.wav` 또는 `--out file.mp3 --format mp3`          |
| 에이전트의 실시간 느낌 응답  | `--out` 없이 기본 재생                                           |
| 타임스탬프 JSON       | `--timestamps-out file.json`                               |
| SRT 또는 WebVTT 자막 | `--timestamps-out file.srt` 또는 `--timestamps-out file.vtt` |
| 클로닝한 커스텀 음성      | `cast voices clone` 후 `--voice-id uc_xxx`                  |

## 기본 사용법

```bash theme={null}
# 바로 재생
cast "Hello, world!"

# 특정 음성 사용
cast "Hello, world!" --voice-id tc_xxx

# WAV 파일로 저장
cast "Hello, world!" --out hello.wav

# MP3 파일로 저장
cast "Hello, world!" --out hello.mp3 --format mp3

# 오디오와 SRT 자막 함께 저장
cast "Hello, world. This is a test." --out hello.wav --timestamps-out hello.srt
```

기본적으로 `cast`는 오디오를 즉시 재생합니다. `--out`을 사용하면 WAV 또는 MP3 파일로 저장할 수 있습니다.

<Info>
  로컬 에이전트가 빠르게 말해야 하는 상황에서는 `--out` 없이 바로 재생하는 방식이 가장 단순합니다. API 레벨의 chunked streaming(`POST /v1/text-to-speech/stream`)은 [Streaming TTS](/ko/quickstart#stream-audio-in-real-time)와 SDK 문서를 참고하세요.
</Info>

## 옵션

| 플래그                   | 설명                                    | 기본값                           |
| --------------------- | ------------------------------------- | ----------------------------- |
| `--voice-id`          | Voice ID                              | `tc_60e5426de8b95f1d3000d7b5` |
| `--model`             | 모델 (`ssfm-v30`, `ssfm-v21`)           | `ssfm-v30`                    |
| `--language`          | 언어 코드 (ISO 639-3)                     | 자동 감지                         |
| `--emotion`           | 감정 유형: `smart`, `preset`              |                               |
| `--emotion-preset`    | 이모션 프리셋 (`--emotion preset` 필요)       |                               |
| `--emotion-intensity` | 감정 강도 0.0-2.0 (`--emotion preset` 필요) | `1.0`                         |
| `--prev-text`         | 문맥을 위한 이전 문장 (`--emotion smart` 전용)   |                               |
| `--next-text`         | 문맥을 위한 다음 문장 (`--emotion smart` 전용)   |                               |
| `--volume`            | 볼륨 (0-200)                            | `100`                         |
| `--pitch`             | 피치 (반음 단위, -12 \~ +12)                | `0`                           |
| `--tempo`             | 템포 배율 (0.5-2.0)                       | `1.0`                         |
| `--format`            | 출력 형식 (`wav`, `mp3`)                  | `wav`                         |
| `--seed`              | 재현 가능한 출력을 위한 부호 없는 정수 시드 (`>= 0`)    |                               |
| `--out`               | 재생 대신 파일로 저장                          |                               |
| `--timestamps-out`    | 타임스탬프 출력을 JSON, SRT, WebVTT로 저장       |                               |
| `--timestamps-format` | 타임스탬프 출력 형식 (`json`, `srt`, `vtt`)    | `--timestamps-out`에서 추론       |
| `--granularity`       | 타임스탬프 단위 (`word`, `char`, `both`)     | 서버 기본값                        |

## 모델

| 모델         | 언어  | 감정                                | 지연시간 |
| ---------- | --- | --------------------------------- | ---- |
| `ssfm-v30` | 37개 | 7개 프리셋 + 스마트 이모션                  | 표준   |
| `ssfm-v21` | 27개 | 4개 프리셋: normal, happy, sad, angry | 낮음   |

```bash theme={null}
cast "Hello, world!" --model ssfm-v21
```

## 감정

<Tabs>
  <Tab title="스마트 이모션">
    AI가 텍스트에서 적절한 감정을 자동으로 추론합니다. 스마트 이모션은 `ssfm-v30`에서 사용할 수 있습니다.

    ```bash theme={null}
    cast "I just got promoted!" --emotion smart
    ```

    더 나은 문맥을 위해 앞뒤 문장을 제공할 수 있습니다:

    ```bash theme={null}
    cast "I just got promoted!" --emotion smart \
      --prev-text "I have been working so hard this year." \
      --next-text "Let's celebrate tonight!"
    ```
  </Tab>

  <Tab title="이모션 프리셋">
    `--emotion-preset`으로 특정 감정을 선택하고 `--emotion-intensity`로 강도를 제어합니다.

    | 모델         | 사용 가능한 프리셋                                                         |
    | ---------- | ------------------------------------------------------------------ |
    | `ssfm-v30` | `normal`, `happy`, `sad`, `angry`, `whisper`, `toneup`, `tonedown` |
    | `ssfm-v21` | `normal`, `happy`, `sad`, `angry`                                  |

    ```bash theme={null}
    cast "Hello, world!" --emotion preset --emotion-preset happy
    cast "Hello, world!" --emotion preset --emotion-preset happy --emotion-intensity 2.0
    cast "Hello, world!" --emotion preset --emotion-preset whisper --emotion-intensity 0.5
    cast "Hello, world!" --model ssfm-v21 --emotion preset --emotion-preset sad
    ```
  </Tab>
</Tabs>
