4️⃣Video to Transcripts

OpenAI: Transcripts

import os
from dotenv import load_dotenv

# 토큰 정보로드
api_key = os.getenv("OPENAI_API_KEY")
load_dotenv()
True

1. 자막생성

from openai import OpenAI

client = OpenAI()
audio_file = open("data/채용면접_샘플_01.wav", "rb")
transcript = client.audio.transcriptions.create(
    file=audio_file,
    model="whisper-1",
    language="ko",
    response_format="srt",  # 자막 포맷
    temperature=0.0,
)

2. YouTube

3. MP3 -> WAV 변환

Last updated