Use LJ Speech sample for voice cloning (Alibaba Cloud URL blocked)
This commit is contained in:
parent
ad6a4d4990
commit
6b4f66dcf5
2 changed files with 84 additions and 13 deletions
70
scripts/download_voice_samples.sh
Normal file
70
scripts/download_voice_samples.sh
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
#!/bin/bash
|
||||
# Download voice samples for Qwen3-TTS voice cloning
|
||||
# Uses LibriSpeech test-clean samples (CC BY 4.0)
|
||||
|
||||
set -e
|
||||
|
||||
VOICES_DIR="${1:-voices/samples}"
|
||||
mkdir -p "$VOICES_DIR"
|
||||
|
||||
echo "Downloading voice samples for Qwen3-TTS cloning..."
|
||||
|
||||
# LibriSpeech test-clean has good quality samples with transcripts
|
||||
# We'll use samples from different speakers for variety
|
||||
|
||||
# Download a small subset from HuggingFace
|
||||
# These are curated samples for the 6 OpenAI-compatible voice types:
|
||||
# - alloy: neutral/balanced
|
||||
# - echo: male, clear
|
||||
# - fable: expressive/storyteller
|
||||
# - onyx: deep male
|
||||
# - nova: female, warm
|
||||
# - shimmer: female, soft
|
||||
|
||||
# Using LibriVox/LibriSpeech samples (public domain audiobooks)
|
||||
# Format: Speaker reads a passage, we take a clean 3-10 second clip
|
||||
|
||||
cat << 'EOF'
|
||||
Voice samples need to be:
|
||||
- 3-10 seconds of clear speech
|
||||
- Single speaker, no background noise
|
||||
- WAV format (16kHz or higher)
|
||||
- With exact transcript
|
||||
|
||||
Recommended sources:
|
||||
1. LibriSpeech test-clean: https://www.openslr.org/12
|
||||
2. VCTK: https://datashare.ed.ac.uk/handle/10283/3443
|
||||
3. LJ Speech: https://keithito.com/LJ-Speech-Dataset/
|
||||
|
||||
For now, using Qwen's demo sample for all voices.
|
||||
To add distinct voices, place WAV files in voices/samples/ and update
|
||||
config/voice_to_speaker.yaml with paths and transcripts.
|
||||
|
||||
Example voice_to_speaker.yaml entry:
|
||||
alloy:
|
||||
ref_audio: voices/samples/alloy.wav
|
||||
ref_text: "The exact words spoken in the audio file."
|
||||
language: English
|
||||
EOF
|
||||
|
||||
# Download LJ Speech sample (public domain) since Qwen's Alibaba Cloud URL is blocked
|
||||
echo "Downloading LJ Speech sample..."
|
||||
curl -L -o "$VOICES_DIR/lj_speech.wav" \
|
||||
"https://github.com/coqui-ai/TTS/raw/main/tests/data/ljspeech/wavs/LJ001-0001.wav" 2>/dev/null || \
|
||||
echo "Failed to download LJ Speech sample"
|
||||
|
||||
# Check if we have the sample
|
||||
if [ -f "$VOICES_DIR/lj_speech.wav" ]; then
|
||||
echo "Downloaded: $VOICES_DIR/lj_speech.wav"
|
||||
echo "Transcript: 'Printing, in the only sense with which we are at present concerned, differs from most if not from all the arts and crafts represented in the Exhibition'"
|
||||
else
|
||||
echo "Warning: Could not download voice sample"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "To add more voices, you can:"
|
||||
echo "1. Record your own samples (3-10 seconds, clear speech)"
|
||||
echo "2. Download from LibriSpeech: https://www.openslr.org/12"
|
||||
echo "3. Use VCTK dataset: https://datashare.ed.ac.uk/handle/10283/3443"
|
||||
echo ""
|
||||
echo "Then update config/voice_to_speaker.yaml with the paths and transcripts."
|
||||
|
|
@ -6,40 +6,41 @@ tts-1-qwen:
|
|||
# Each voice requires ref_audio (reference audio) and ref_text (transcript of the audio)
|
||||
# Language: Chinese, English, Japanese, Korean, German, French, Russian, Portuguese, Spanish, Italian
|
||||
|
||||
# Default voice - using Qwen's example clone audio
|
||||
# Default voice - using LJ Speech sample (public domain)
|
||||
# Original Qwen demo URL (https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen3-TTS-Repo/clone.wav) is blocked
|
||||
alloy:
|
||||
ref_audio: https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen3-TTS-Repo/clone.wav
|
||||
ref_text: "Okay. Yeah. I resent you. I love you. I respect you. But you know what? You blew it!"
|
||||
ref_audio: voices/samples/lj_speech.wav
|
||||
ref_text: "Printing, in the only sense with which we are at present concerned, differs from most if not from all the arts and crafts represented in the Exhibition"
|
||||
language: English
|
||||
|
||||
# Echo - same sample, different name for compatibility
|
||||
echo:
|
||||
ref_audio: https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen3-TTS-Repo/clone.wav
|
||||
ref_text: "Okay. Yeah. I resent you. I love you. I respect you. But you know what? You blew it!"
|
||||
ref_audio: voices/samples/lj_speech.wav
|
||||
ref_text: "Printing, in the only sense with which we are at present concerned, differs from most if not from all the arts and crafts represented in the Exhibition"
|
||||
language: English
|
||||
|
||||
# Fable - same sample
|
||||
fable:
|
||||
ref_audio: https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen3-TTS-Repo/clone.wav
|
||||
ref_text: "Okay. Yeah. I resent you. I love you. I respect you. But you know what? You blew it!"
|
||||
ref_audio: voices/samples/lj_speech.wav
|
||||
ref_text: "Printing, in the only sense with which we are at present concerned, differs from most if not from all the arts and crafts represented in the Exhibition"
|
||||
language: English
|
||||
|
||||
# Onyx - same sample
|
||||
onyx:
|
||||
ref_audio: https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen3-TTS-Repo/clone.wav
|
||||
ref_text: "Okay. Yeah. I resent you. I love you. I respect you. But you know what? You blew it!"
|
||||
ref_audio: voices/samples/lj_speech.wav
|
||||
ref_text: "Printing, in the only sense with which we are at present concerned, differs from most if not from all the arts and crafts represented in the Exhibition"
|
||||
language: English
|
||||
|
||||
# Nova - same sample
|
||||
nova:
|
||||
ref_audio: https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen3-TTS-Repo/clone.wav
|
||||
ref_text: "Okay. Yeah. I resent you. I love you. I respect you. But you know what? You blew it!"
|
||||
ref_audio: voices/samples/lj_speech.wav
|
||||
ref_text: "Printing, in the only sense with which we are at present concerned, differs from most if not from all the arts and crafts represented in the Exhibition"
|
||||
language: English
|
||||
|
||||
# Shimmer - same sample
|
||||
shimmer:
|
||||
ref_audio: https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen3-TTS-Repo/clone.wav
|
||||
ref_text: "Okay. Yeah. I resent you. I love you. I respect you. But you know what? You blew it!"
|
||||
ref_audio: voices/samples/lj_speech.wav
|
||||
ref_text: "Printing, in the only sense with which we are at present concerned, differs from most if not from all the arts and crafts represented in the Exhibition"
|
||||
language: English
|
||||
|
||||
# Custom voice example - add your own reference audio
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue