유튜브 자막 번역 서비스로! 유튜브 2배 성장하기

안녕하세요 나춘배입니다.

오랜만에 유용한 경험을 하나 해서, 전파해보고자 글을 올려봅니다!

여자친구가 유튜브를 하고 있습니다. 구독자는 7만명정도 되는데, 최근 외국인 유입이 늘면서 자막을 달아달라는 성원에..! 제가 자막 번역 서비스를 하나 뚝딱 만들어보기로 했습니다.


하필 gpt를 써야만 했던 이유는, ( 파파고랑 deepL도 있는데 굳이? )

1. 유튜브 자막은 사람이 말하는 대화체이다 보니 기계처럼 번역하면 어색함. ( 의도를 잘 못알아채요 )
2. 뜨개질 용어와 밈을 사용하는 일이 있다보니 => 사전을 입력해서 1:1 번역하는 방식에 한계가 있음. ( 사람이 알아서 눈치 껏, 맥락을 읽어가면서 번역해줘야 합니다. )

우선 제가 잘 쓰는 엑셀을 사용해서 MVP를 빠르게 만들어보기로 했습니다.


< 사용할 툴 >
1. Google spread Sheet ( Google Apps script )

  1. GPT API

https://wooncloud.tistory.com/147

function gpt(subtitle, prompt) {
  const apiKey = 'API KEY 입력하세요!';  // 제공된 API 키
  const systemPrompt = `
    You are a knitting Youtube script translator. Please refer to the Korean knitting terminology below to help you translate Youtube scripts.
  `;

  const messages = [
    { role: "system", content: systemPrompt },
    { role: "user", content: prompt + "\n" + subtitle }
  ];

  const url = 'https://api.openai.com/v1/chat/completions';
  
  const options = {
    'method': 'post',
    'contentType': 'application/json',
    'headers': {
      'Authorization': `Bearer ${apiKey}`
    },
    'payload': JSON.stringify({
      'model': 'gpt-4o-mini-2024-07-18',
      'messages': messages,
      'temperature': 0.7
    })
  };
  
  try {
    const response = UrlFetchApp.fetch(url, options);
    const json = JSON.parse(response.getContentText());
    
    if (json && json.choices && json.choices.length > 0) {
      return json.choices[0]?.message?.content?.trim() || "No response";
    }
  } catch (e) {
    return `Error: ${e.message}`;
  }
  return "No response";
}

Google Apps Script는 엑셀의 VBA와 유사한 툴이라고 생각하시면 편한데요.
생각보다 확장성이 무궁무진 합니다. 그래서 이 툴로 gpt함수를 만들어뒀어요.
=gpt(A1, B2) 이런식으로 쓸 수 있게됩니다.



이후 적당히 문장을 끊어줬습니다.
7문장 정도로 묶어서 작업을 진행했습니다.

굳이 7문장인 이유는 없고, 토큰 문제로 적당히 끊는게 필요했습니다. 입력 량이 많아지면 에러가 발생하고, 입력량이 너무 적으면 맥락을 이해못해서 번역 품질이 낮아지는 문제가 발생해서 - 한 7문장정도면 적당히 잘 나오지 않을까~ 해서 7문장으로 맞췄습니다.

그리고 분할된 문장에 병렬식으로 gpt를 호출시켰습니다.

한국어 텍스트가 포함된 페이지의 스크린샷


사용한 프롬프트입니다. 그냥 o1 preview로 '기계가 알아듣기 쉽게 만들어' 라고 필요한 지침을 대충 주었고, 들어가는 토큰량은 많겠지만 돌려보니 100% 오류 없이 잘 돌아가서, 그냥 사용하고 있습니다. ( 가장 좋은 프롬프트는 썼을때, 내 의도와 부합하는 대로 결과물이 잘 나오는 프롬프트라고 생각합니다 ㅎㅎ. 여러 기법 덕지덕지 붙여서 깎는 시간보다, 적당히 gpt로 빠르게 만든 다음에, 빨리 결과 돌려보고 원하는대로 잘 나오면 그냥 그 프롬프트를 쓰시는걸 추천해요! )

지켜야할 조건은

  1. 전문 용어대로 번역하기 ( 뜨다 → float, 코 → nose로 번역해서, knit와 stitch 등으로 지정해줬어요. )

  2. 번역 시간 건드리지 않기, 포맷 지키기

  3. 뜨개질 용어 잘 사용하기

You are a knitting YouTube script translator. Please translate the subtitles I provide from Korean to English, using the specified knitting terminology below for accurate translation.

Instructions:

Input and Output Format:

The subtitles are in SRT format, consisting of blocks of three lines each:

First line: Subtitle number (e.g., 4)
Second line: Timing line (e.g., 00:00:10,000 --> 00:00:12,000)
Third line: Subtitle text in Korean
Do not change the subtitle numbers or timing lines in any way. Keep them exactly as they are in the input.

Output the subtitles in the same format, with the same numbering and timing lines, translating only the subtitle text (the third line of each block) from Korean to English.

Do not add, remove, or modify any lines or content other than translating the subtitle text.

Formatting Rules:

Preserve the exact format, including line breaks, spaces, and punctuation.

Do not reset or change the numbering; the numbering may start from any number and may not be sequential.

Do not generate any additional subtitles or change the number of subtitles.

Translation Guidelines:

Use the provided knitting terminology below for accurate translations.

Ensure that each sentence in the input is translated into a separate sentence in the output. If the translation causes two sentences to become one, separate them back into two sentences to match the original number of sentences.

Understand the context, but output the script step by step, matching the structure and number of sentences of the original text.

Knitting Terminology:

게이지: gauge
코: stitch
단: row
실: yarn
코위찬: Cowichan
스와치: swatch
겉(뜨기): knit
안(뜨기): purl
걸러(뜨기): slip
코 줍기: pick up
바늘비우기: yarn over
꼬아(뜨기): through the back loop
코 잡기: cast on
코 막기: cast off
겉면, 앞면: right side
뒷면, 안쪽면: wrong side
도안: pattern
꽈배기무늬: cable
배색 컬러: contrasting color
단수링: marker
메리야스 뜨기: stockinette stitch
고무 뜨기: ribbing
------------------------------------------------------------------------
Example (Output only, do not include the input in your response):

Input:

4
00:00:10,000 --> 00:00:12,000
다음 자막입니다

5
00:00:12,100 --> 00:00:15,000
계속해서 진행됩니다

6
00:00:15,100 --> 00:00:18,000
더 많은 내용이 있습니다
Output:

4
00:00:10,000 --> 00:00:12,000
Here is the next subtitle

5
00:00:12,100 --> 00:00:15,000
It continues onward

6
00:00:15,100 --> 00:00:18,000
There is more content

---------------------------------------------------------
Note: Only provide the translated subtitles in your output, exactly following the format shown in the example. Do not include any additional text or comments. Do not change the numbering or timing lines. The format must remain exactly the same as the input, except for the translated subtitle text.

Workflow

srt 다운 → txt 확장자 변경 → 스프레드 시트에 복사 → 자막 각 셀에 분할 → gpt 함수 호출 → 번역본 합치기 → 복사 → 번역한 txt 파일 생성 → srt 확장자 변경 → 전달

이 과정이 대략 3분~5분 정도 걸렸습니다.

번역본 한개당 비용은 0.01달러 정도 ( 10원? ) 들었어요.

인건비가 드니 한 500원 정도 드는 작업이네요.

고객 만족도 5점을 받았습니다. 포상으로 치킨을 받았습니다.
자동화 시켜두고 1회 1000원정도의 서비스로 출시해도 되겠어요 ㅎㅎ

영어, 일본어, 중국어, 러시아어, 프랑스어, 이탈리아어, 베트남어 등등.. 10개 국어 정도 자막을 달았습니다.

그럼 효과는 있었을까요?

한국의 가장 인기 있는 노래 스크린샷


효과는 엄청났습니다... ( 뿌듯 )

대한민국의 비중이 63%에서 46%로...

10만회 기준 63000명의 한국사람과 37000명의 외국인이 있었는데

63000명의 한국인이 그대로 있다고 가정하면 13만7천
외국인 시청자가 37000 x2로 뛰었네요!
외국인 시청자 200% 상승!!

당시 영상이 자막을 단 덕분인지? 알고리즘을 무지 잘 타서,
한국사람도 더 많았고 외국인은 더 많이 늘었을거라 추정돼요.

한국 시청자만큼 외국인 시청자들이 많이 늘었어요.
조회수 보다도, 유튜브롤 좋아해주시는 구독자 분들이 좋아해줘서 뿌듯했어요.

베댓이 되어버린 일본인 구독자분

한국어 문자가 적힌 메시지
분홍색 꽃이 그려진 봉투


스페인어를 달자 찾아오신 아르헨티나분

흰색 배경에 녹색과 흰색 로고

페루에서 오신 시청자분

s라는 단어가 포함된 한국어 문자 메시지

터키에서 온 사랑의 인사

한국어로 된 문자 메시지의 스크린샷

뜨개질로 글로벌 대동단결!!

한국어 문자 메시지 스크린샷

세계로 뻗어나가는 유튜브 채널이 되고있어요 ㅎㅎ
좀 더 디벨롭하게 되면, 또 글 써보겠습니다 ㅎㅎ

감사합니다!

8
2개의 답글

👉 이 게시글도 읽어보세요