A React-based UI for blending multiple voices using the ElevenLabs API. Select two voices and use the interactive 2D slider to control the blend ratio.
A detailed review of this experiment can be found on Substack.
- Select from available ElevenLabs voices
- Draggable slider for voice blending control
- Real-time audio generation and playback
- Audio Analysis of blended results
-
Install dependencies:
npm install
-
Configure API Key: Create a
.envfile in the root directory:VITE_ELEVENLABS_API_KEY=your_elevenlabs_api_key_here VITE_CARTESIA_API_KEY=your_cartesia_api_key -
Install the spectrogram viewer
npm i react-audio-spectrogram-player -
Run the development server:
npm run dev
-
Open your browser: Navigate to the URL shown in the terminal (typically
http://localhost:5173)
- Install dependencies
pip install fastapi uvicorn librosa soundfile numpy
- Run the backend server
python -m uvicorn backend.main:app --reload --port 8000
- This should run the backend API on
localhost:8000
- Select two voices from the dropdown menus
- Drag the handle in the slider to adjust the blend ratio:
- Moving left/right adjusts the ratio between Voice 1 and Voice 2
- Choose the Blending Method algorithm
- Click "Blend Voices" to generate the blended audio
- Play the result using the audio player
npm run buildThe built files will be in the dist directory.