녹음이 끝났거나 요청 한 건으로 처리할 오디오 구간이 정해져 있다면 파일 전사를 사용하세요. 오디오를 업로드한 뒤 최종 전사문을 받거나, 모델이 파일을 처리하는 동안 텍스트를 스트리밍으로 받을 수 있습니다.
먼저 gpt-transcribe 모델을 사용하세요. 녹음된 음성을 원래 언어로 전사할 때 권장하는 모델입니다. 아래의 화자 레이블, 단어별 타임스탬프, 자막 형식 예제에서는 사용 중단 예정(deprecated) 모델을 사용합니다.
whisper-1, gpt-4o-transcribe, gpt-4o-mini-transcribe,
gpt-4o-transcribe-diarize 모델과 /v1/audio/translations 엔드포인트는 사용 중단 예정(deprecated)이며
2027년 2월 26일에 운영이 종료됩니다. 사용 중단 공지를 확인하고 현재 지원되는 전사 워크플로우를 선택하세요.
아래 예제는 운영 종료 전까지 기존 연동에서 사용할 수 있는 특수 기능을 설명합니다.
파일 크기는 최대 25 MB입니다. 지원되는 입력 형식은 mp3, mp4, mpeg, mpga, m4a, wav, webm입니다.
마이크, 통화 또는 미디어 스트림에서 오디오가 계속 들어오는 경우에는
실시간 전사를 사용하세요.
빠른 시작
전사
오디오 파일을 /v1/audio/transcriptions로 전송할 때 gpt-transcribe 모델을 지정하세요.
오디오 전사
Python
1
2
3
4
5
6
7
8
9
10
11import fs from "fs";import OpenAI from "openai";const openai = new OpenAI();const transcription = await openai.audio.transcriptions.create({ file: fs.createReadStream("fixtures/audio.wav"), model: "gpt-transcribe",});console.log(transcription.text);
키워드는 모델이 참고하는 힌트이므로 전사문에 반드시 포함되지는 않습니다. 관련 있는 용어만 입력하세요. 키워드를 사용하면 정확도가 높아지는지, 실제로 말하지 않은 용어가 전사문에 추가되지는 않는지 확인하세요.
gpt-transcribe에서는 languages가 단수형 필드인 language를 대체합니다. 두 필드를 함께 보내지 마세요. 각 키워드는 한 줄에 입력하고 <, >, 캐리지 리턴 또는 줄 바꿈 문자(LF)를 포함하지 마세요. 키워드에 이러한 문자가 하나라도 있거나 prompt가 모델의 길이 제한을 초과하면 API는 요청 전체를 거부합니다.
화자 분리
기존 연동에서는 2027년 2월 26일까지 사용 중단 예정(deprecated) 모델인 gpt-4o-transcribe-diarize로 녹음의 각 구간에서 누가 말하는지 식별할 수 있습니다. 화자 레이블을 붙이는 데 특화된 모델이므로 일반적인 파일 전사에는 권장하지 않습니다.
diarized_json 응답 형식을 요청하면 speaker, start, end 메타데이터가 포함된 구간을 받을 수 있습니다. 오디오가 30초보다 길면 chunking_strategy에 "auto" 또는 음성 활동 감지 설정을 지정하세요.
필요하면 짧은 참조 오디오를 최대 4개까지 제공할 수 있습니다. known_speaker_names[]와 known_speaker_references[]를 사용하면 각 구간을 이미 알고 있는 화자와 연결할 수 있습니다. 각 참조 클립의 길이는 2~10초여야 하며, 전사할 오디오를 업로드할 때 지원되는 입력 형식이라면 모두 사용할 수 있습니다. 멀티파트 폼 데이터를 사용하는 경우 클립을 데이터 URL로 인코딩하세요.
stream=true를 설정하면 화자 레이블이 포함된 응답에서 구간이 완료될 때마다 transcript.text.segment 이벤트가 발생합니다. transcript.text.delta 이벤트에는 segment_id 필드가 있지만, 화자 정보는 포함되지 않습니다. 모델은 구간을 확정할 때만 화자를 지정합니다.
화자 레이블은 /v1/audio/transcriptions에서 사용할 수 있습니다. 실시간 전사 세션에서는 지원되지 않습니다.
번역
사용 중단 예정(deprecated) 엔드포인트인 /v1/audio/translations는 whisper-1을 사용해 녹음이 끝난 오디오를 영어로 번역합니다. 이 엔드포인트는 2027년 2월 26일까지 사용할 수 있습니다. 전사는 녹음의 원래 언어를 유지하지만, 이 엔드포인트는 영어 텍스트만 반환합니다.
실시간 번역으로 마이그레이션하려면 gpt-realtime-translate 모델을 /v1/realtime/translations에서 사용하세요. 번역 세션을 열고, 오디오를 스트리밍으로 입력하고, 번역 이벤트를 처리해야 합니다. /v1/audio/translations 요청에서 모델 ID만 바꿔서는 마이그레이션할 수 없습니다.
지원 언어
입력에 어떤 언어가 사용될지 알고 있다면 languages를 gpt-transcribe와 함께 사용하세요. 지원되는 언어 코드 형식은 다음과 같습니다.
ISO 639-1 코드(예: en, es, fr)
일부 ISO 639-3 코드(예: eng, spa, yue, cmn)
지역별 zh 로캘 코드(예: zh-cn, zh-tw, zh-hk)
API는 지원되지 않거나 형식이 잘못된 언어 코드를 거부합니다. 응답에는 모델이 신뢰할 만한 수준으로 감지한 언어도 포함됩니다.
whisper-1을 사용하는 경우 Whisper 언어 목록을 참고하세요. Whisper는 98개 언어를 지원하지만 정확도는 언어마다 다릅니다. 언어 힌트를 하나만 받는 기존 모델은 language를 사용하며 languages는 사용하지 않습니다.
타임스탬프
기존 연동에서는 2027년 2월 26일까지 사용 중단 예정(deprecated) 모델인 whisper-1로 단어별 또는 구간별 타임스탬프를 얻을 수 있습니다. timestamp_granularities[] 매개변수를 사용하면 자막 제작 및 동영상 편집에 필요한 구조화된 타임스탬프 데이터를 받을 수 있습니다.
프롬프트를 사용하면 이름, 약어, 해당 녹음에서 쓰이는 특유의 어휘를 더 정확하게 인식하고 원하는 표기 형식을 더 잘 반영할 수 있습니다. gpt-transcribe에서는 프롬프트를 keywords, languages와 함께 사용하세요. 예제는 전사 컨텍스트 추가에서 확인할 수 있습니다.
기존 gpt-4o-transcribe 및 gpt-4o-mini-transcribe 연동에서도 프롬프트를 사용할 수 있습니다. gpt-4o-transcribe-diarize는 프롬프트를 지원하지 않습니다.
프롬프트는 다음과 같은 작업에 유용합니다.
제품명, 기술 용어, 약어를 정확하게 전사하기
긴 녹음을 나누어 전사할 때 이전 구간의 컨텍스트 전달하기
문장 부호, 대소문자, 말할 때 습관적으로 덧붙이는 표현 유지하기
해당 언어에서 사용할 문자 체계 선택하기
whisper-1의 프롬프트는 최대 224토큰이며, 권장 전사 모델에 비해 프롬프트로 결과를 제어할 수 있는 범위가 좁습니다. 워크플로우에 Whisper가 필요하다면 신뢰도 높이기를 참고하세요.
전사 결과 스트리밍
파일 전사에서는 모델이 녹음이 끝난 파일을 처리하는 동안 텍스트를 부분적으로 받아볼 수 있습니다. 이때 실시간 세션은 필요하지 않습니다.
녹음이 끝난 오디오의 전사 결과 스트리밍
stream=true를 설정하고 gpt-transcribe를 사용하세요. 모델이 녹음의 각 부분을 전사할 때마다 Transcriptions API가 전사 이벤트를 반환합니다.
모델은 오디오를 전사하는 동안 transcript.text.delta 이벤트를 보내고, 마지막 transcript.text.done 이벤트에서 전체 전사문을 반환합니다. 화자 레이블이 포함된 전사를 위해 response_format="diarized_json"을 설정하면 화자 분리 모델이 구간을 확정할 때마다 transcript.text.segment 이벤트도 보냅니다.
기존 gpt-4o-transcribe, gpt-4o-mini-transcribe, gpt-4o-transcribe-diarize 연동에서도 파일 전사 결과를 스트리밍할 수 있습니다.
whisper-1은 이 기능을 지원하지 않습니다.
녹음 중인 오디오의 전사 결과 스트리밍
마이크, 통화 또는 미디어 스트림에서 실시간으로 들어오는 오디오를 전사하려면 위의 파일 기반 스트리밍 방식 대신 실시간 전사 가이드를 따르세요. 이 가이드에서는 현재 전사 세션의 처리 플로우와 gpt-live-transcribe 모델을 사용하는 권장 실시간 전사 방식을 설명합니다.
신뢰도 높이기
타임스탬프, 자막 또는 번역에 whisper-1을 사용한다면 다음 방법으로 드물게 쓰이는 단어와 약어의 인식률을 높일 수 있습니다. 일반적인 용도의 전사 기능을 새로 구현한다면 gpt-transcribe로 시작하고 전사 컨텍스트를 활용하세요.
첫 번째 방법은 선택 사항인 프롬프트 매개변수에 단어의 정확한 표기를 목록으로 전달하는 것입니다.
Whisper는 범용 텍스트 모델처럼 지시를 따르지 않으며, 최대 224토큰의 프롬프트를 받습니다.
이 방법은 신뢰도를 높여 주지만 프롬프트가 224토큰으로 제한됩니다. 따라서 처리 규모가 커져도 이 방법을 계속 사용하려면 SKU 목록이 비교적 짧아야 합니다.
두 번째 방법은 텍스트 모델로 전사문을 후처리하는 것입니다.
system_prompt 변수로 지시 사항을 전달하세요. 전사 프롬프트와 마찬가지로 회사명과 제품명을 포함할 수 있습니다.
후처리
Python
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28const systemPrompt = `You are a helpful assistant for the company ZyntriQix. Your task isto correct any spelling discrepancies in the transcribed text. Makesure that the names of the following products are spelled correctly:ZyntriQix, Digique Plus, CynapseFive, VortiQore V8, EchoNix Array,OrbitalLink Seven, DigiFractal Matrix, PULSE, RAPT, B.R.I.C.K.,Q.U.A.R.T.Z., F.L.I.N.T. Only add necessary punctuation such asperiods, commas, and capitalization, and use only the context provided.`;const transcript = await transcribe(audioFile);const completion = await openai.chat.completions.create({ model: "gpt-4.1", temperature: temperature, messages: [ { role: "system", content: systemPrompt, }, { role: "user", content: transcript, }, ], store: true,});console.log(completion.choices[0].message.content);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24system_prompt ="""You are a helpful assistant for the company ZyntriQix. Your task is to correctany spelling discrepancies in the transcribed text. Make sure that the names ofthe following products are spelled correctly: ZyntriQix, Digique Plus,CynapseFive, VortiQore V8, EchoNix Array, OrbitalLink Seven, DigiFractalMatrix, PULSE, RAPT, B.R.I.C.K., Q.U.A.R.T.Z., F.L.I.N.T. Only add necessarypunctuation such as periods, commas, and capitalization, and use only thecontext provided."""defgenerate_corrected_transcript(temperature, system_prompt, audio_file): response = client.chat.completions.create(model="gpt-4.1",temperature=temperature,messages=[ {"role": "system", "content": system_prompt}, {"role": "user", "content": transcribe(audio_file, "")}, ], )return response.choices[0].message.contentcorrected_text = generate_corrected_transcript(0, system_prompt, fake_company_filepath)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49package mainimport ( "context" "fmt" "os" "github.com/openai/openai-go/v3")const systemPrompt = `You are a helpful assistant for the company ZyntriQix. Your task isto correct any spelling discrepancies in the transcribed text. Makesure that the names of the following products are spelled correctly:ZyntriQix, Digique Plus, CynapseFive, VortiQore V8, EchoNix Array,OrbitalLink Seven, DigiFractal Matrix, PULSE, RAPT, B.R.I.C.K.,Q.U.A.R.T.Z., F.L.I.N.T. Only add necessary punctuation such asperiods, commas, and capitalization, and use only the context provided.`func main() { file, err := os.Open("fixtures/speech.wav") if err != nil { panic(err) } defer file.Close() client := openai.NewClient() transcription, err := client.Audio.Transcriptions.New(context.Background(), openai.AudioTranscriptionNewParams{ File: file, Model: openai.AudioModelGPT4oTranscribe, }) if err != nil { panic(err) } completion, err := client.Chat.Completions.New(context.Background(), openai.ChatCompletionNewParams{ Model: "gpt-4.1", Temperature: openai.Float(0), Messages: []openai.ChatCompletionMessageParamUnion{ openai.SystemMessage(systemPrompt), openai.UserMessage(transcription.Text), }, Store: openai.Bool(true), }) if err != nil { panic(err) } fmt.Println(completion.Choices[0].Message.Content)}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42import com.openai.client.OpenAIClient;import com.openai.client.okhttp.OpenAIOkHttpClient;import com.openai.models.audio.transcriptions.TranscriptionCreateParams;import com.openai.models.chat.completions.ChatCompletionCreateParams;import java.nio.file.Path;String systemPrompt = """ You are a helpful assistant for the company ZyntriQix. Your task is to correct any spelling discrepancies in the transcribed text. Make sure that the names of the following products are spelled correctly: ZyntriQix, Digique Plus, CynapseFive, VortiQore V8, EchoNix Array, OrbitalLink Seven, DigiFractal Matrix, PULSE, RAPT, B.R.I.C.K., Q.U.A.R.T.Z., F.L.I.N.T. Only add necessary punctuation such as periods, commas, and capitalization, and use only the context provided. """;var result = client .audio() .transcriptions() .create( TranscriptionCreateParams.builder() .file(Path.of(System.getenv("OPENAI_EXAMPLE_AUDIO_PATH"))) .model("gpt-4o-transcribe") .build());var completion = client .chat() .completions() .create( ChatCompletionCreateParams.builder() .model("gpt-4.1") .temperature(0.0) .store(true) .addSystemMessage(systemPrompt) .addUserMessage(result.asTranscription().text()) .build());completion.choices().stream() .flatMap(choice -> choice.message().content().stream()) .forEach(System.out::println);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32using OpenAI.Audio;using OpenAI.Chat;string key = Environment.GetEnvironmentVariable("OPENAI_API_KEY")!;string model = "gpt-4.1";ChatClient client = new(model, key);string transcriptionModel = "gpt-4o-transcribe";AudioClient audio = new(transcriptionModel, key);await using FileStream source = File.OpenRead("speech.wav");AudioTranscription transcription = await audio.TranscribeAudioAsync(source, "speech.wav");string systemPrompt = """ You are a helpful assistant for the company ZyntriQix. Correct any spelling discrepancies in the transcribed text. Make sure the names of these products are spelled correctly: ZyntriQix, Digique Plus, CynapseFive, VortiQore V8, EchoNix Array, OrbitalLink Seven, DigiFractal Matrix, PULSE, RAPT, B.R.I.C.K., Q.U.A.R.T.Z., F.L.I.N.T. Only add necessary punctuation such as periods, commas, and capitalization, and use only the context provided. """;ChatCompletionOptions correctionOptions = new() { Temperature = 0 };ChatCompletion completion = await client.CompleteChatAsync( [ new SystemChatMessage(systemPrompt), new UserChatMessage(transcription.Text), ], correctionOptions);Console.WriteLine(completion.Content[0].Text);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17require "openai"require "pathname"client = OpenAI::Client.newaudio = Pathname("speech.wav")transcript = client.audio.transcriptions.create( file: audio, model: "gpt-4o-mini-transcribe")raise "Expected a JSON transcript response" if transcript.is_a?(StringIO)response = client.responses.create( model: "gpt-4.1", input: "Add punctuation and paragraph breaks without changing the words:\n#{transcript.text}")puts(response.output_text)
텍스트 모델은 잘못된 철자를 바로잡을 수 있으며, 프롬프트가 224토큰으로 제한되는 Whisper보다 긴 용어 목록을 처리할 수 있습니다. 화자의 말이 달라지지 않도록 수정한 내용을 원본 오디오와 대조해 확인하세요.