EchoWizard Backend ๐งโโ๏ธ
The backend service for EchoWizard, an AI-powered tool that transcribes and comprehends audio files (including YouTube videos), then generates intelligent summaries and answers questions with precise timestamps.
๐ง Tech Stack
- Node.js + Express โ RESTful API server
- Google Gemini GenAI โ Audio comprehension (summaries and question answering)
- AssemblyAI โ Transcription and timestamp extraction
- yt-dlp โ YouTube audio extraction
- Multer โ File upload handling
โจ Features
- Upload audio files or provide a YouTube video URL
- Transcribe audio with sentence-level timestamps
- Generate detailed summaries with cited timestamps
- Ask follow-up questions and receive timestamped answers
- Automatically deletes temporary files after processing
๐ API Endpoints
POST /summarize-upload
Description: Upload an audio file or provide a YouTube URL to receive a timestamped transcript and structured summary.
Request (multipart/form-data):
audioโ (optional) an audio file to uploadyoutubeUrlโ (optional) YouTube video URL to process
Response:
{
"summary": "Structured summary with timestamps",
"fileUri": "Google Gemini uploaded file URI",
"mimeType": "audio/mpeg",
"transcript": "Formatted transcript with timestamps"
}
POST /answer
Description: Ask a question about an already-processed audio file.
Request (multipart/form-data):
fileUriโ The URI returned from /summarize-uploadmimeTypeโ audio/mpegtranscript- Timestamped transcript from /summarize-uploadquestion- Your question
Response:
"A helpful answer based on the transcript and audio, with timestamps included where relevant."
๐งช Running Locally
1. Clone and install
git clone https://github.com/your-username/echowizard-backend.git
cd echowizard-backend
npm install
2. Add your .env
Create a .env file in the root:
ASSEMBLYAI_API_KEY=your_assemblyai_key
GEMINI_API_KEY=your_google_genai_api_key
PROJECT_ID=your_google_project_id
3. Start the server
npm start
Server will run at http://localhost:3000
๐ Project Structure
.
โโโ index.js # Main Express app
โโโ helpers/
โ โโโ assembly.js # Transcription logic
โ โโโ downloadYoutube.js # YouTube MP3 downloader
โโโ uploads/ # Temp audio files
โโโ .env # API keys (not committed)
โโโ README.md
๐ง Example Flow
Send a YouTube URL or audio file to /summarize-upload
Get back a timestamped transcript and rich summary
Ask specific follow-up questions using /answer
๐ช Future Ideas
- Support for longer audio files
- Implement OAuth to login and save chat history
๐ Author
Made with ๐ก by Sabina Ismailova for AI Hackfest
Built With
- assemblyai
- express.js
- gemini
- next.js
- typescript
Log in or sign up for Devpost to join the conversation.