/Al-Asmaai

Al-Asma''i: The Digital Poet is an innovative AI model. When you give it the name of an Arabic poem, it creates the poem's text and converts it into visual and audio presentations. Combining AI with traditional Arabic poetry, it offers a unique experience where users can see and hear their favorite poems in a new and expressive way.

Primary LanguagePython

Al-Asma'i: The Digital Poet

License Python OpenAI ElevenLabs Contributions Welcome

Al-Asma'i is an AI-powered project that brings Arabic poetry to life through multimedia generation. It converts textual poetry into a rich experience of generated images and background audio.

You can find the .ipynb file in Hugging Face Dataset

Features:

πŸ–ΌοΈ Image generation for each verse using DALL-E πŸ”Š Audio narration of verses using ElevenLabs πŸ“ Verse explanations and illustrations using GPT 🎞️ Automatic video generation combining images and audio 🏰 Era classification of poems

Hello, πŸ–‹πŸ“œ

We will be presenting the final project for the Data Science and Artificial Intelligence. Through this project, we use artificial intelligence to convert textual poetry into a multimedia experience of generated images and background audio. πŸŽ¨πŸ”Š

We are trying to explore Arabic poetry and shed light on its aesthetics and artistic depth in an innovative and engaging way.

first you should get the data from Hugging Face Dataset The data from (https://www.aldiwan.net/) Thanks to the collecter: (https://huggingface.co/datasets/arbml/ashaar)

To achieve this, we will:

  1. πŸ’» Install and set up the necessary AI libraries for generating images and audio, such as OpenAI and ElevenLabs.
  2. πŸ”Œ Prepare the application programming interfaces (APIs) to interact with these libraries properly.
  3. πŸŽ¨πŸ”Š Utilize these APIs to generate the appropriate images and audio for the Arabic poetry, and you may also need the huggingface tokenizer API.
  4. πŸ“½οΈ Integrate the multimedia elements (images and audio) into a cohesive experience, synchronizing the image display with the audio playback.
  5. πŸŽ‰Present this integrated poetic multimedia experience and emphasize the value it adds to Arabic poetry arts.

How To Use:

Hugging Face Dataset Open In Colab

Prerequisites:

Python 3.9+

OpenAI API key

ElevenLabs API key

Installation:

Clone the repository:

git clone https://github.com/yourusername/al-asmai.git
cd al-asmai

Install the required packages:

pip install -r requirements.txt

Set up your API keys as environment variables:

Copyexport OPENAI_API_KEY='your_openai_key_here'
export ELEVENLABS_API_KEY='your_elevenlabs_key_here'

Usage:

Prepare your poem data in a CSV format similar to poems.csv in the repository. Run the main script:

python al_asmai.py

Enter the title of the poem when prompted. The script will generate explanations, illustrations, audio, and images for each verse, and finally produce a video.

Contributing: Contributions are welcome! Please feel free to submit a Pull Request. License This project is open source and available under the MIT License.

Acknowledgments:

First for "Atheer" and "Lujain" for coming up with the idea

OpenAI for providing the GPT and DALL-E APIs

ElevenLabs for the text-to-speech API

All the great Arabic poets whose works inspire this project]

Demo

Al-Asma'i Demo

In this video, you'll witness how Al-Asma'i transforms Arabic poetry into a rich multimedia experience:

  • πŸ–ΌοΈ Generating vivid images for each verse
  • πŸŽ™οΈ Creating immersive audio narrations
  • 🎬 Compiling everything into a captivating video presentation

Don't miss this unique blend of traditional Arabic poetry and cutting-edge AI technology!