|
|
1 год назад | |
|---|---|---|
| .history | 1 год назад | |
| backend | 1 год назад | |
| doubao-api | 1 год назад | |
| frontend | 1 год назад | |
| logs | 1 год назад | |
| scripts | 1 год назад | |
| 提示词包 | 1 год назад | |
| .DS_Store | 1 год назад | |
| .gitignore | 1 год назад | |
| API接口文档.md | 1 год назад | |
| README.md | 1 год назад | |
| start.sh | 1 год назад | |
| test_recording.html | 1 год назад | |
| test_websocket.html | 1 год назад | |
| 技术框架和建设方案.md | 1 год назад | |
| 生成进度跟踪.md | 1 год назад | |
| 部署指南.md | 1 год назад | |
| 需求分析书.md | 1 год назад | |
| 需求文档.md | 1 год назад |
Tolan is a web-based real-time English conversation interface powered by Doubao AI. It enables users to have natural voice conversations with AI through an intuitive web interface featuring voice input, real-time audio processing, and AI-generated speech responses.
macOS:
brew install ffmpeg
Linux (Ubuntu/Debian):
sudo apt update && sudo apt install ffmpeg
Use the automated startup script to run both frontend and backend:
./start.sh start
This will:
cd backend
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Run the backend
python run.py
cd frontend
# Install dependencies
npm install
# Start development server
npm start
Create a .env file in the backend directory with your API credentials:
DOUBAO_API_KEY=your_doubao_api_key_here
DOUBAO_BASE_URL=https://api.doubao.com
To run the tests for this project, execute the following command in your terminal:
# Navigate to backend directory
cd backend
# Activate virtual environment
source venv/bin/activate
# Run specific test file
pytest test_main.py
# Run all tests
pytest
# Run tests with coverage
pytest --cov=src tests/
ws://localhost:8765GET /healthGET /docs (FastAPI auto-generated)http://localhost:3000# Start all services
./start.sh start
# Check service status
./start.sh status
# View logs
./start.sh logs
# Stop all services
./start.sh stop
# Restart services
./start.sh restart
# Clean up processes
./start.sh cleanup
# Stop all related processes
pkill -f "react-scripts"
pkill -f "run.py"
# Check port usage
lsof -ti:3000 # Frontend
lsof -ti:8765 # Backend
Tolan/
├── backend/ # Python backend (FastAPI + WebSocket)
├── frontend/ # React frontend
├── scripts/ # Deployment and utility scripts
├── logs/ # Application logs
└── start.sh # Main startup script
The project includes:
Port Already in Use:
./start.sh cleanup
Audio Not Working: Ensure FFmpeg is installed and microphone permissions are granted
API Connection Failed: Check your .env file and Doubao API credentials
Dependencies Issues:
./start.sh setup # Re-setup environment
logs/frontend.loglogs/backend.logThis project is licensed under the MIT License.
For questions and support, please refer to the API documentation or create an issue in the repository.