A modern Next.js application that generates AI images using FAL.AI's image generation API and supports voice input through Deepgram's speech-to-text API.
- 🎨 AI Image Generation using FAL.AI's flux/dev model
- 🎤 Voice-to-Text input using Deepgram
- ⚡ Real-time image generation with status updates
- 🎯 High-definition square image output
- 🎨 Modern UI with Tailwind CSS
- 🔒 Secure API key handling through proxy routes
[Add screenshots or GIF here]
- Next.js 14 (App Router)
- TypeScript
- Tailwind CSS
- FAL.AI Client
- Deepgram SDK
- React Hooks
- Node.js 18+
- npm or yarn
- FAL.AI API key (Get one here)
- Deepgram API key (Get one here)
- Clone the repository:
git clone https://github.com/yourusername/ai-image-generator.git
cd ai-image-generator- Install dependencies:
npm install
# or
yarn install- Create a
.env.localfile in the root directory:
FAL_KEY=your_fal_ai_key_here
DEEPGRAM_API_KEY=your_deepgram_key_here- Start the development server:
npm run dev
# or
yarn dev- Open http://localhost:3000 in your browser.
- Enter a text prompt describing the image you want to generate, or click the microphone button to use voice input.
- If using voice input, speak your prompt and click the button again to stop recording.
- Click "Generate" to create your image.
- Wait for the image to be generated (usually takes 10-15 seconds).
- The generated image will appear below the input field.
src/
├── app/
│ ├── api/
│ │ ├── fal/
│ │ │ └── proxy/
│ │ │ └── route.ts # FAL.AI proxy route
│ │ │
│ │ └── components/
│ │ └── ImageGenerator.tsx # Main component
│ │
│ ├── lib/
│ │ └── contexts/
│ │ └── DeepgramContext.tsx # Deepgram context
│ │
│ ├── layout.tsx
│ └── page.tsx
│
├── .env.local.example
└── package.json
Create a .env.local file with the following variables:
FAL_KEY=your_fal_ai_key_here
DEEPGRAM_API_KEY=your_deepgram_key_here- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- FAL.AI for their amazing image generation API
- Deepgram for their speech-to-text API
- Next.js team for the awesome framework
- Tailwind CSS for the styling utilities