Skip to content

Commit e892c41

Browse files
authored
Merge pull request #9 from intellwe/feat/vc
FEAT: Implement voice-changer with live record and upload voice file
2 parents 24e7aa1 + 5654a3f commit e892c41

File tree

2 files changed

+498
-2
lines changed

2 files changed

+498
-2
lines changed

src/App.tsx

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
import React, { useState, useEffect } from 'react';
2-
import { Mic, FileAudio, Heart } from 'lucide-react';
2+
import { Mic, FileAudio, Heart, Wand2 } from 'lucide-react';
33
import AudioUploader from './components/AudioUploader';
44
import TranscriptDisplay from './components/TranscriptDisplay';
55
import { TranscriptResponse } from './types';
66
import LiveRecording from './components/LiveRecording';
77
import StandaloneTextToSpeech from './components/StandaloneTextToSpeech';
8+
import VoiceChanger from './components/VoiceChanger';
89

910
function App() {
1011
const [transcript, setTranscript] = useState<TranscriptResponse | null>(null);
1112
const apiKey = import.meta.env.VITE_ELEVEN_LABS_API_KEY || "";
1213
const [currentYear] = useState(new Date().getFullYear());
13-
const [activeTab, setActiveTab] = useState<'transcribe' | 'tts'>('transcribe');
14+
const [activeTab, setActiveTab] = useState<'transcribe' | 'tts' | 'voice-changer'>('transcribe');
1415

1516
const handleTranscriptReceived = (data: TranscriptResponse) => {
1617
setTranscript(data);
@@ -68,6 +69,16 @@ function App() {
6869
>
6970
Text to Speech
7071
</button>
72+
<button
73+
onClick={() => setActiveTab('voice-changer')}
74+
className={`px-6 py-3 font-medium text-sm transition-colors ${
75+
activeTab === 'voice-changer'
76+
? 'text-blue-400 border-b-2 border-blue-400'
77+
: 'text-gray-400 hover:text-gray-200'
78+
}`}
79+
>
80+
Voice Changer
81+
</button>
7182
</div>
7283

7384
{/* Transcribe Audio Tab */}
@@ -98,6 +109,13 @@ function App() {
98109
<StandaloneTextToSpeech apiKey={apiKey} />
99110
</div>
100111
)}
112+
113+
{/* Voice Changer Tab */}
114+
{activeTab === 'voice-changer' && (
115+
<div className="mb-12">
116+
<VoiceChanger apiKey={apiKey} />
117+
</div>
118+
)}
101119
</main>
102120

103121
<footer className="mt-16 text-center text-gray-400 py-6 border-t border-gray-700 animate-fade-in animation-delay-700">

0 commit comments

Comments
 (0)