A cutting-edge Angular-based 3D lip sync animation platform designed for aircraft crew training and operational scenarios. This application combines speech recognition, 3D avatar rendering, and audio synthesis to create an interactive crew instruction system.
π€ Voice Recognition: Real-time speech recognition for hands-free operation
π£οΈ Speech Synthesis: Natural-sounding crew announcements
π€ 3D Avatar: Interactive crew avatar with lip synchronization
π Audio Visualization: Real-time audio frequency analysis
π± Responsive Design: Works across desktop and mobile devices
β‘ Real-time Animation: Smooth 3D animations powered by Three.js
- Framework: Angular 17+ with signals
- 3D Rendering: Three.js (via CDN)
- Speech: Web Speech API (Recognition & Synthesis)
- Audio: Web Audio API for analysis and visualization
- Styling: CSS3 with modern features (Grid, Flexbox, backdrop-filter)
- Build System: Angular CLI with TypeScript
The system recognizes the following voice commands and plays corresponding crew instructions:
| Voice Command | Instruction |
|---|---|
| "turbulence" | Turbulence warning and safety instructions |
| "seatbelt" | Seatbelt sign activation announcement |
| "landing" | Prepare for landing instructions |
| "safety" | Safety demonstration announcement |
- Node.js 18.x or higher
- npm or yarn package manager
- Modern web browser with Web Speech API support
- Microphone access for voice recognition
- Clone the repository:
git clone <repository-url>
cd aircraft-crew-3d- Install dependencies:
npm install- Start the development server:
ng serve- Open your browser and navigate to
http://localhost:4200
ng build --prodThe build artifacts will be stored in the dist/ directory.
- Click the "Start Voice Recognition" button
- Say one of the pre-defined commands (e.g., "turbulence")
- The system will recognize the command and play the corresponding instruction
- Use the quick command buttons for immediate instruction playback
- Each button corresponds to a specific crew scenario
- The avatar automatically animates with lip sync during audio playback
- Audio visualization shows real-time frequency analysis
- Use "Reset Avatar" to return to default position
- Monitor all system activities in the log section
- View timestamps and action descriptions
- Automatically maintains the last 10 activities
- Chrome 80+
- Edge 80+
- Firefox 70+
- Safari 14+
| Feature | Chrome | Firefox | Safari | Edge |
|---|---|---|---|---|
| Speech Recognition | β | β | β | β |
| Speech Synthesis | β | β | β | β |
| Web Audio API | β | β | β | β |
| Three.js | β | β | β | β |
Note: Speech recognition is currently limited to Chromium-based browsers
src/
βββ app/
β βββ app.ts # Main application component
β βββ app.html # Application template
β βββ app.css # Application styles
β βββ app.config.ts # Application configuration
βββ assets/
β βββ audio/ # Audio files (placeholder)
βββ index.html # Main HTML file
βββ styles.css # Global styles
- Handles voice input detection
- Processes natural language commands
- Manages recognition lifecycle
- Three.js scene management
- Avatar mesh creation and animation
- Lip sync animation based on audio analysis
- Speech synthesis for crew announcements
- Real-time audio analysis for lip sync
- Visual frequency display
- Follow Angular style guide
- Use TypeScript for type safety
- Implement reactive patterns with signals
- Write unit tests for critical functions
- Update the
availableCommandsarray inapp.ts:
{
keyword: 'newcommand',
label: 'New Command Label',
instruction: 'Instruction text to be spoken',
audioFile: 'assets/audio/newcommand.mp3'
}- The system will automatically recognize the new command
Modify the createAvatar() method in app.ts to:
- Change avatar appearance
- Add more detailed geometry
- Implement advanced animations
- Load external 3D models
Speech recognition not working:
- Ensure microphone permissions are granted
- Check browser compatibility (Chrome/Edge recommended)
- Verify HTTPS connection for production
3D avatar not displaying:
- Check browser console for Three.js errors
- Ensure WebGL is enabled in browser
- Verify CDN links are accessible
Audio not playing:
- Check browser audio permissions
- Verify speakers/headphones are connected
- Test with browser developer tools
Enable debug logging by opening browser developer tools and checking the console for detailed information about:
- Speech recognition events
- Audio processing status
- 3D rendering performance
- Component lifecycle
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Three.js community for 3D rendering capabilities
- Angular team for the reactive framework
- Web Speech API for voice recognition
- Modern browser vendors for advanced web APIs
For support and questions:
- Create an issue in the GitHub repository
- Check the troubleshooting section
- Review browser compatibility requirements
Built with β€οΈ for aircraft crew training and safety