An open-source project that generates engaging short stories for bedtime using Python as the backend and OpenAI's ChatGPT for storytelling. This tool is perfect for creating personalized, age-appropriate tales to share with loved ones or enjoy on your own.
- 🎨 Story Customization:
- Choose themes, characters, and story length.
- Specify age groups and moral lessons.
- 🎧 Text-to-Speech Integration:
- Listen to your stories with natural-sounding audio.
- 📚 Save and Share:
- Save generated stories or share them with others.
- 🔄 Open Source:
- Built with extensibility and community contributions in mind.
- Backend: FastAPI
- AI Integration: OpenAI's GPT model
- Database: MongoDB
- Frontend: React/Vue.js
- Text-to-Speech: gTTS/pyttsx3
- Deployment: Docker, AWS/Heroku
- Python 3.9+ installed.
- API key from OpenAI.
- (Optional) MongoDB for storing user data and stories.
- Docker (if you prefer containerized deployment).
-
🔧 Clone the Repository:
git clone https://github.com/yourusername/bedtime-story-generator.git cd bedtime-story-generator
-
🔢 Install Dependencies:
pip install -r requirements.txt
-
🔐 Set Up Environment Variables: Create a
.env
file with the following:OPENAI_API_KEY=your_openai_api_key MONGO_URI=your_mongodb_connection_string
-
🚀 Run the Backend:
uvicorn main:app --reload
-
🌐 Access the API: Open
http://127.0.0.1:8000/docs
in your browser for API documentation.
We welcome contributions! To get started:
- Fork the repository.
- Create a feature branch:
git checkout -b feature-name
- Commit your changes and push:
git commit -m "Add feature description" git push origin feature-name
- Submit a pull request.
Check out our CONTRIBUTING.md for more details.
This project is licensed under the MIT License. See the LICENSE file for details.
- MVP: Basic story generation via API.
- Add user profiles and saved stories feature.
- Integrate text-to-speech functionality.
- Build a frontend web app.
- Open plugin system for new story genres.
Have questions? Reach out via GitHub issues or email me at endiba360@gmail.com
.