Subtitle Translation with Timestamp Alignment
From Wikiprompt, the free prompt encyclopedia
Subtitle Translation with Timestamp Alignment A detailed prompt for translating subtitles with timestamp alignment, allowing merging of lines and requiring JSON output.
Prompt ContentSave
🌐
Translate English subtitles into Chinese while maintaining correspondence with the original timestamps.
1. Input is an array where each item contains a timestamp and text. You can transform the data structure into any format you prefer.
2. Output 1: Chinese subtitles translated from the English subtitles. To improve translation quality, allow GPT to merge some English subtitle lines into one Chinese subtitle line. For example, the first and second lines in the input should be merged and translated into one result: "When you wake up in the morning, the very first thoughts you have" + "normally are in your mother tongue." -> "当你早上醒来时,你通常会用母语思考。"
3. Output 2: Map each Chinese translation to the corresponding English original lines. One Chinese translation can correspond to multiple English original lines.
4. You can use external program code, but the translation and Chinese-English mapping parts should be done by GPT.
5. The output should be easy to parse, preferably in JSON format.
6. Theoretically, "gpt-3.5-turbo" can do this without issues, but "gpt-4" is also acceptable.
Tip: Use CoT (Chain of Thought) and Function Calling.
Input example:
[
{
"timestamp": "00:01:34.500",
"text": "When you wake up in the morning,\nthe very first thoughts you have"
},
{
"timestamp": "00:01:37.980",
"text": "normally are in your mother tongue."
},
{
"timestamp": "00:01:40.739",
"text": "Maybe it's Spanish or Portuguese\nor Zulu or another language."
},
{
"timestamp": "00:01:46.260",
"text": "But now we have to switch this to\nEnglish, and you do this by first starting"
},
{
"timestamp": "00:01:53.129",
"text": "with a five minute writing session."
},
{
"timestamp": "00:01:56.370",
"text": "Notice that I said five minutes,\nnot 20 minutes, not 30 minutes."
},
{
"timestamp": "00:02:01.289",
"text": "No, a short period of time, only five\nminutes, and it must be about your day."
},
{
"timestamp": "00:02:08.838",
"text": "What are you planning to do\nbecause you already have an idea."
},
{
"timestamp": "00:02:12.709",
"text": "Maybe you're going to work or maybe\nyou have to go to school, or maybe you"
},
{
"timestamp": "00:02:16.429",
"text": "have to take care of your children."
}
]
Sign in to see the full prompt
Continue with:
By logging in, you agree to our Terms of Use and Privacy Policy
Usage
This prompt is designed for use with productivity. Copy the prompt content above and paste it into your preferred AI tool.
For best results, you may customize the placeholders (indicated by square brackets or capital letters) with your specific requirements.
References
- Category: productivity Prompts
- Source: https://x.com/dotey/status/1675546729767157760
Talk
0 comments