Downloads · 30 days
0
Malakemam11/EgyptianArabic-Phoneme-VITS
EgyptianArabic-Phoneme-VITS is a machine learning model from Malakemam11. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This repository contains the workflow for training a text-to-speech (TTS) system for Egyptian Arabic using the VITS model from Coqui TTS. It includes dataset preparation, model configuration, and training steps tailor…
Downloads · 30 days
0
Access
Public
Updated Dec 25, 2024
Repo size
—
Likes
0
Public
Click a slice to open those files.
.ipynb1.7 MB · 100%
From the Hugging Face model README
This repository contains the workflow for training a text-to-speech (TTS) system for Egyptian Arabic using the VITS model from Coqui TTS. It includes dataset preparation, model configuration, and training steps tailored for phoneme-based synthesis.
The notebook was developed using Google Colab. Below are the key dependencies:
zipfile, os, subprocessMount Google Drive to access the dataset using the provided script:
from google.colab import drive
drive.mount("/content/drive")
Extract the dataset ZIP file and organize the WAV files for processing:
import os
import subprocess
input_path = "/content/final_VITS_dataset/wavs"
output_path = "/content/VITS_processed_dataset/wavs"
os.makedirs(output_path, exist_ok=True)
https://drive.google.com/file/d/1N4ZPviPghoYqvqpNKW2fHrCJ96qNEaDy/view?usp=sharing
from TTS.utils.synthesizer import Synthesizer
# Updated parameters for the synthesizer
model_path = "/content/drive/MyDrive/VITS-TRIAL-PHON-2/runs/VITS-AR-phon-2-December-23-2024_12+04AM-0000000/checkpoint_58000.pth"
config_path = "/content/drive/MyDrive/VITS-TRIAL-PHON-2/runs/VITS-AR-phon-2-December-23-2024_12+04AM-0000000/config.json"
# Initialize the synthesizer
synthesizer = Synthesizer(
tts_checkpoint=model_path,
tts_config_path=config_path,
vocoder_checkpoint=None,
)
# Adjust speech parameters for slower, clearer output
synthesizer.tts_model.args.length_scale = 2 # Increase for slower speech
synthesizer.tts_model.args.inference_noise_scale = 0.5 # Reduce noise
synthesizer.tts_model.args.inference_noise_scale_dp = 0.8 # Reduce noise distortions
# Text to synthesize
text = "عامل ايه يا حبيبي واحشني أوي فينك من زمان كده"
# Generate speech
wav = synthesizer.tts(text)
# Save the output to a file
output_path = "output_slow_clear.wav"
synthesizer.save_wav(wav, output_path)
print(f"Audio saved to {output_path}")
from IPython.display import Audio
Audio(output_path, autoplay=True)