This repository has been archived by the owner on Jun 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
synthesize_vocals.py
104 lines (99 loc) · 3.05 KB
/
synthesize_vocals.py
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
import os
import torch
from TTS.api import TTS
# Initialize the TTS model
tts = TTS(model_name="tts_models/en/ljspeech/tacotron2-DDC", progress_bar=True, gpu=False)
# Function to synthesize vocals
def synthesize_vocals(text, output_path):
# Generate the audio
tts.tts_to_file(text=text, file_path=output_path)
# Example usage
lyrics = """
Goli maaaaaaar... goli maar!
Goli mar-mar-mar-mar-mar-mar-(mar)...
Goli mar-mar-mar-mar-mar-(mar).....
Kashno rau kaugileste yenche staavooo...
Ne pali manta meste yee maltovooo.....
Kandaru padda kane shungaa.. raamaaaa...
Valkunga guda yesta vaya raamaaa...
Goli maar!
Goli.. mar-mar-mar-mar-(mar)....
Rrrrrgrrryyaaaaayaaaaa!
Puttan gane!
Matte koye!
Kutte chan taan vaaste...
Muttu ta taa lantee...
Alla e potaabe anno luuu....
Balla ma ti che staaro...
Alla lika ti staaro....
Unna ma ti poya ka!
Uuhu paata restaaro..
Ouuu.. iltii baltii pubantii...
Ouuu.. shaaltii shantii womchantii..
"""
# Split the lyrics into smaller segments
lyrics_segments = [
"Goli maaaaaaar... goli maar!",
"Goli mar-mar...",
"mar-mar...",
"mar-(mar)...",
"Goli mar-mar...",
"mar-mar-(mar).....",
"Kashno rau kaugileste yenche staavooo...",
"Ne pali manta meste yee maltovooo.....",
"Kandaru padda kane shungaa.. raamaaaa...",
"Valkunga guda yesta vaya raamaaa...",
"Goli maar!",
"Goli.. mar-mar-mar-mar-(mar)....",
"Rrrrrgrrryyaaaaayaaaaa!",
"Puttan gane!",
"Matte koye!",
"Kutte chan taan vaaste...",
"Muttu ta taa lantee...",
"Alla e potaabe anno luuu....",
"Balla ma ti che staaro...",
"Alla lika ti staaro....",
"Unna ma ti poya ka!",
"Uuhu paata restaaro..",
"Ouuu.. iltii baltii pubantii...",
"Ouuu.. shaaltii shantii womchantii..",
"Ruddem, rouddem, ririim saa..",
"Murkam burdam mumuur-shaa...",
"Killeeer-killeer-killeer...",
"killeer-killeer...",
"Goli maar!",
"Goli maar-maar-maar...",
"maar-maar-maar-(maar)...",
"Killeeer-killeer-killeer...",
"killeer-killeer...",
"Muttan gane!",
"Nitte koye!",
"Korvi da yaa laaste...",
"Kongu lan tuu kuunte..",
"Challa re dagda go ii puuduuu..",
"Cheta vadi chestaaro..",
"Kordii merda kostaaro..",
"Shma shanala viduyo..",
"Isha chaalu partaaro...",
"Ouu, naari, ghyaari.. vayaari..",
"Ouu, tagga, kaali, kankaadi!",
"Tiivruum, tiindruum dibdrug shaa..",
"Munduu vinuka parik shaa..",
"Killeeer-killeer-killeer...",
"killeer-killeer...",
"Goli maar!",
"Goli maar-maar-maar...",
"maar-maar-(maar)....",
"Kashno rau kaugileste enche stavooo...",
"Ne pali manta meste ye maltovooo.....",
"Kandaru padda kane shungaa.. raamaaaa...",
"Valkunga guda yesta vaya raamaaa...",
"Gooli maar! ... maar-maar-maar...",
"maar-maar-(maar)....",
"Ayyyeeeeeeee!!!!!"
]
# Synthesize each segment and save to individual files
for i, segment in enumerate(lyrics_segments):
output_path = f"golimaar_synthesized_segment_{i}.wav"
synthesize_vocals(segment, output_path)
print(f"Synthesized vocals saved to {output_path}")