File size: 795 Bytes
b51190f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/bin/bash

# Piper TTS Training Script for Saudi Arabic (MSA)
# This script trains a Piper voice model using the prepared training data

cd /root/piper_msa/piper1-gpl

# Activate virtual environment
source .venv/bin/activate

# Set PyTorch memory optimization
export PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True

# Training command - optimized for GPU memory
# Reduced batch size from 32 to 8 to avoid OOM errors
python3 -m piper.train fit \
  --data.voice_name "saudi_msa" \
  --data.csv_path /root/piper_msa/training_data.csv \
  --data.audio_dir /root/piper_msa/raw_audio/ \
  --model.sample_rate 22050 \
  --data.espeak_voice "ar" \
  --data.cache_dir /root/piper_msa/cache/ \
  --data.config_path /root/piper_msa/output/config.json \
  --data.batch_size 8

echo "Training completed!"