A Next.js 15 application that provides a voice interface for Amazon Q using Amazon Bedrock Nova Sonic.
This application serves as a voice interface for Amazon Q, allowing users to interact with Amazon Q through voice commands and receive audio responses. The application uses Amazon Bedrock's Nova Sonic S2S (Speech-to-Speech) functionality to provide a natural conversational experience.
- Voice input through microphone
- Text input for typing queries
- Audio responses from Amazon Q
- Visual conversation interface
- Waveform visualization for audio
- Configurable voice settings
- Theme customization (light/dark mode)
- Accessibility features
- Framework: Next.js 15 with App Router
- Language: TypeScript
- Styling: Tailwind CSS
- Component Library: Shadcn/UI
- Animations: Framer Motion
- State Management: React Context API
- AWS Integration: AWS SDK for JavaScript
- Node.js 18 or later
- AWS account with access to Amazon Bedrock
- AWS credentials configured locally
-
Clone the repository:
git clone https://github.com/yourusername/amazon-q-voice.git cd amazon-q-voice -
Install dependencies:
npm install
-
Configure AWS credentials:
# Set up AWS credentials in ~/.aws/credentials or use environment variables -
Start the development server:
npm run dev
-
Open http://localhost:3000 in your browser.
- Click the microphone button to start recording
- Speak your query
- Click the button again to stop recording and send the query to Amazon Q
- Alternatively, type your query in the text input field
- Listen to the response or read the text
You can configure various aspects of the application through the settings panel:
- System Prompt: Customize the instructions given to Amazon Q
- Voice Settings: Choose voice type, quality, and temperature
- AWS Region: Select the AWS region to use for Bedrock
- Appearance: Toggle between light and dark mode, enable high contrast or reduced motion
The application is structured into several key components:
- BedrockService: Handles communication with Amazon Bedrock API
- AudioManager: Manages audio recording and playback
- ConversationManager: Manages conversation state and history
- SessionContext: Provides session state and management to components
- UI Components: Provides the user interface for interaction
This project is currently in development. See the TODO.md file for current progress and upcoming tasks.
This project is licensed under the MIT License - see the LICENSE file for details.
- Amazon Web Services for providing the Bedrock and Nova Sonic services
- The Next.js and React communities for their excellent documentation and tools