> ## 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로 타임스탬프 정렬 데이터, SRT 자막, WebVTT 자막을 생성합니다.

CLI는 타입캐스트 Timestamp TTS를 호출해 생성된 오디오와 함께 정렬 데이터를 저장할 수 있습니다. 쇼츠 자막, 소셜 영상 캡션 타이밍, 가라오케 스타일 하이라이트, 립싱크 메타데이터가 필요할 때 사용합니다.

## 자막 생성

```bash theme={null}
# 오디오와 SRT 자막 저장
cast "Hello, world. This is a test." \
  --out hello.wav \
  --timestamps-out hello.srt

# 오디오와 WebVTT 자막 저장
cast "Hello, world. This is a test." \
  --out hello.wav \
  --timestamps-out hello.vtt \
  --timestamps-format vtt
```

`--timestamps-format`을 생략하면 CLI는 `--timestamps-out` 확장자에서 `srt` 또는 `vtt`를 추론하고, 그렇지 않으면 `json`으로 저장합니다.

## 원본 타임스탬프 JSON 저장

```bash theme={null}
cast "Hello, world. This is a test." \
  --out hello.wav \
  --timestamps-out hello.timestamps.json
```

JSON은 다른 도구가 자막을 만들거나, 텍스트 애니메이션을 렌더링하거나, 시각 요소를 직접 정렬해야 할 때 유용합니다.

## Granularity 선택

```bash theme={null}
cast "Hello, world." \
  --out hello.wav \
  --timestamps-out hello.srt \
  --granularity both
```

일본어(`jpn`)나 중국어(`zho`)처럼 단어 사이 공백이 없는 언어는 문자 단위 타임스탬프가 자막 타이밍에 더 적합합니다:

```bash theme={null}
cast "こんにちは。世界。" \
  --language jpn \
  --out hello.wav \
  --timestamps-out hello.srt
```

## 에이전트용 자막 워크플로우

```text theme={null}
script.txt에서 내레이션 오디오와 자막을 만들어줘.
CLI를 사용해줘.
오디오는 ./video/voiceover.wav에 저장해줘.
자막은 ./video/voiceover.srt에 저장해줘.
자막 파일은 오디오 파일 옆에 둬.
```

## 출력 선택

| 출력      | 사용 시점                                 |
| ------- | ------------------------------------- |
| `.srt`  | 영상 편집기, Shorts/Reels/TikTok 자막 import |
| `.vtt`  | 웹 비디오 플레이어와 브라우저 기반 preview           |
| `.json` | 커스텀 렌더링, 가라오케 하이라이트, 립싱크, 후속 자동화      |

<Tip>
  소셜 영상에서는 오디오와 자막을 같은 단계에서 생성하세요. 최종 내레이션과 자막 타이밍이 같은 합성 결과에 묶입니다.
</Tip>
