# Creating Synced Lyrics with Translations by merging with another field

**URL:** https://community.mp3tag.de/t/creating-synced-lyrics-with-translations-by-merging-with-another-field/66389
**Category:** General Discussion
**Created:** [October 31, 2024, 4:54pm UTC](https://community.mp3tag.de/t/creating-synced-lyrics-with-translations-by-merging-with-another-field/66389 "2024-10-31T16:54:50Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Casual\_Tea](https://community.mp3tag.de/user_avatar/community.mp3tag.de/casual_tea/32/18886_2.png) [@Casual\_Tea](https://community.mp3tag.de/u/Casual_Tea)
#### Post date: [October 31, 2024, 5:33pm UTC](https://community.mp3tag.de/t/creating-synced-lyrics-with-translations-by-merging-with-another-field/66389/2 "2024-10-31T17:33:12Z")

</div>

In case no one provides an mp3tag solution, here's a simple python script I just created with the help of ChatGPT for this purpose.

```auto
def zip_files(file_a_path, file_b_path, output_path):
    # Open both files with UTF-8 encoding and read the lines
    with open(file_a_path, 'r', encoding='utf-8') as file_a, open(file_b_path, 'r', encoding='utf-8') as file_b:
        lines_a = file_a.readlines()
        lines_b = file_b.readlines()
        
        # Check if line counts match
        if len(lines_a) != len(lines_b):
            print("The files have different line counts and cannot be zipped together.")
            return
        
        # Open the output file with UTF-8 encoding to write the zipped lines
        with open(output_path, 'w', encoding='utf-8') as output_file:
            for line_a, line_b in zip(lines_a, lines_b):
                # Strip newline characters and format output
                output_file.write(f"{line_a.strip()}\n{line_b.strip()}\n")

    print("Files have been zipped successfully!")

# Example usage:
zip_files('original language.txt', 'translation.txt', 'output.lrc')

```

Save this as `zipme.py` (or whatever name you like) in a folder.  
Then create 2 .txt files in the same folder that you name `original language.txt` and `translation.txt`  
Open both in a text editor and save the original lyrics to `original language.txt` and the translation to `translation.txt`. Ensure that the line count of both is identical. Then open a cmd window in that folder (CTRL+L → `cmd` → ENTER) followed by `zipme.py` → ENTER  
That ought to create a new file called output.lrc with the results you want.  
If you keep all 3 files open in a text editor that detects changes like Notepad++ that should be relatively quick.

For the test case you provided:  
original language.txt =

```auto
[00:00.00] A
[00:01.00] B
[00:02.00] C

```

translation.txt =

```auto
1
2
3

```

it yielded output.lrc =

```auto
[00:00.00] A
1
[00:01.00] B
2
[00:02.00] C
3

```

I have not tested it further than that. I'd be curious how this can be solved in Mp3tag.

---

_[View the full topic](https://community.mp3tag.de/t/creating-synced-lyrics-with-translations-by-merging-with-another-field/66389)._
