Working with GUI, auto loopback creation, soprano streaming
This commit is contained in:
52
setup_alsa_bridge.sh
Executable file
52
setup_alsa_bridge.sh
Executable file
@@ -0,0 +1,52 @@
|
||||
#!/bin/bash
|
||||
# Setup script to make soprano_to_rvc available as an ALSA device for RVC
|
||||
|
||||
ASOUND_RC="$HOME/.asoundrc"
|
||||
SINK_NAME="soprano_to_rvc"
|
||||
|
||||
echo "Setting up ALSA configuration for soprano_to_rvc..."
|
||||
|
||||
# Backup existing .asoundrc if it exists
|
||||
if [ -f "$ASOUND_RC" ]; then
|
||||
cp "$ASOUND_RC" "${ASOUND_RC}.backup.$(date +%s)"
|
||||
echo "✓ Backed up existing .asoundrc"
|
||||
fi
|
||||
|
||||
# Check if our configuration already exists
|
||||
if grep -q "pcm.soprano_rvc" "$ASOUND_RC" 2>/dev/null; then
|
||||
echo "✓ Configuration already exists in .asoundrc"
|
||||
else
|
||||
echo "Adding ALSA configuration..."
|
||||
|
||||
cat >> "$ASOUND_RC" << 'EOF'
|
||||
|
||||
# Soprano to RVC bridge
|
||||
pcm.soprano_rvc {
|
||||
type pulse
|
||||
device soprano_to_rvc.monitor
|
||||
hint {
|
||||
show on
|
||||
description "Soprano TTS to RVC Bridge"
|
||||
}
|
||||
}
|
||||
|
||||
ctl.soprano_rvc {
|
||||
type pulse
|
||||
device soprano_to_rvc.monitor
|
||||
}
|
||||
EOF
|
||||
|
||||
echo "✓ Added ALSA configuration to .asoundrc"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "=" * 70
|
||||
echo "Setup complete!"
|
||||
echo ""
|
||||
echo "The virtual device 'soprano_rvc' is now available as an ALSA device."
|
||||
echo ""
|
||||
echo "In RVC GUI:"
|
||||
echo " 1. Set device type to 'ALSA'"
|
||||
echo " 2. Select 'soprano_rvc' or 'Soprano TTS to RVC Bridge' as input"
|
||||
echo " 3. Make sure the soprano_to_virtual_sink.py script is running"
|
||||
echo ""
|
||||
Reference in New Issue
Block a user