This repository has been archived on 2026-08-19. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
ROCm-Research-Archive/Scripts and Tests/_test_voice_train.sh
T
2026-08-20 00:45:43 +02:00

39 lines
1.4 KiB
Bash

#!/bin/bash
# 1. Generate a reference audio from Vivian
echo "[1] Generating reference audio from Vivian..."
curl -s -o /tmp/vivian_ref.wav \
-H "Content-Type: application/json" \
-d '{"input":"Dies ist ein Test der Sprachsynthese. Meine Stimme sollte geklont werden koennen.","voice":"Vivian","language":"german"}' \
http://localhost:8072/v1/audio/speech
echo "Generated /tmp/vivian_ref.wav: $(ls -la /tmp/vivian_ref.wav 2>&1)"
# 2. Train a custom voice from that audio
echo ""
echo "[2] Training custom voice 'meine_stimme' from reference audio..."
curl -v -X POST http://localhost:8072/v1/voices/train \
-F "audio=@/tmp/vivian_ref.wav" \
-F "name=meine_stimme" \
-F "text=Dies ist ein Test der Sprachsynthese." \
-F "description=Vivian clone test" \
-F "language=german" \
2>&1
# 3. List voices
echo ""
echo "[3] Listing all voices..."
curl -s http://localhost:8072/v1/voices 2>&1
# 4. Generate speech with the cloned voice
echo ""
echo "[4] Generating speech with cloned voice..."
curl -s -o /tmp/clone_test.wav \
-H "Content-Type: application/json" \
-d '{"input":"Hallo, ich bin eine geklonte Stimme. Das ist ziemlich cool.","voice":"meine_stimme","language":"german"}' \
http://localhost:8072/v1/audio/speech
echo "Generated /tmp/clone_test.wav: $(ls -la /tmp/clone_test.wav 2>&1)"
# 5. Voice details
echo ""
echo "[5] Voice details..."
curl -s http://localhost:8072/v1/voices/meine_stimme 2>&1