A powerful Android application that transforms YouTube videos into interactive learning experiences by extracting transcripts, generating summaries, and creating structured tutorials. This project is inspired by Tutorial-Youtube-Made-Simple.
- Transcript Extraction: Automatically fetches and processes YouTube video transcripts
- Smart Summarization: Uses AI to generate concise, topic-based summaries
- Interactive Learning: Converts video content into Q&A format
- Multi-language Support: Currently supports English transcripts only
- Export Functionality: Share summaries in HTML format
- Error Handling: Robust error management for various scenarios
Watch our demo video to see TutorialYoutubeMadeSimple in action:
- Language: Kotlin
- Architecture: MVVM (Model-View-ViewModel)
- Concurrency: Coroutines
- Networking: OkHttp, Retrofit
- JSON Processing: org.json, kotlinx.serialization
- AI Integration: OpenRouter API with Gemini model
- YouTube Data API
- OpenRouter API
- Gemini AI Model
- Apache Commons Text Library
- Android Studio Arctic Fox or later
- Kotlin 1.9.0 or later
- YouTube API Key
- OpenRouter API Key
- Clone the repository:
git clone https://github.com/moclam1905/TutorialYoutubeMadeSimple.git-
Open the project in Android Studio
-
Add your API keys in the project:
// MainActivity.kt
companion object {
const val YOUTUBE_API_KEY = "your_youtube_api_key"
const val OPENROUTER_API_KEY = "your_openrouter_api_key"
}- Build and run the project
- Input a YouTube video URL or ID:
viewModel.startSummarization(
videoUrlOrId = "https://www.youtube.com/watch?v=example",
youtubeApiKey = YOUTUBE_API_KEY
)- Get video transcript:
val transcripts = YouTubeTranscriptLight.create().getTranscript(videoId)
val transcriptText = transcripts.joinToString(" ") { it.text }- Export summary:
viewModel.exportSummaryToHtml(context)try {
val transcripts = YouTubeTranscriptLight.create().getTranscript(videoId)
// Process transcripts
} catch (e: YouTubeTranscriptLight.TranscriptError) {
when (e) {
is YouTubeTranscriptLight.TranscriptError.VideoNotFound ->
// Handle video not found
is YouTubeTranscriptLight.TranscriptError.TranscriptsDisabled ->
// Handle disabled transcripts
is YouTubeTranscriptLight.TranscriptError.NoTranscriptAvailable ->
// Handle no transcript available
is YouTubeTranscriptLight.TranscriptError.NetworkError ->
// Handle network errors
is YouTubeTranscriptLight.TranscriptError.LanguageNotFound ->
// Handle language not found
}
}The project follows MVVM architecture with the following components:
- YouTubeTranscriptLight: Handles transcript fetching and parsing
- LLMProcessor: Manages AI-powered content processing
- SummaryViewModel: Coordinates the summarization workflow
- ApiService: Manages API communications
- User inputs YouTube URL
- ViewModel initiates processing
- Transcript is fetched and parsed
- Content is processed by LLM
- Summary is generated and displayed
A lightweight, efficient transcript extractor designed for YouTube videos, inspired by youtube-transcript-api. This is an unofficial implementation that provides the following key features:
- Network Efficiency: Uses OkHttp for optimized HTTP requests
- Regex-based Parsing: Employs pattern matching to extract transcript data
- Error Classification: Implements sealed classes for granular error handling
- Video Page Fetching: Retrieves raw HTML content
- Captions Extraction:
- Parses JSON data from video page
- Validates video ID and captions availability
- Handles reCAPTCHA detection
- Transcript Processing:
- Extracts timing information
- Cleans and formats text content
- Handles HTML entity decoding
AI-powered content analyzer using OpenRouter's Gemini model. Features:
- Two-Pass Processing:
- Topic extraction and question generation
- Content simplification and answer generation
- Batch Processing: Efficient handling of multiple topics
- JSON-based Communication: Structured data exchange with LLM
- Topic Extraction:
- Limits to 5 most relevant topics
- Generates up to 3 thought-provoking questions per topic
- Content Simplification:
- ELI5 (Explain Like I'm 5) approach
- HTML formatting for enhanced readability
- Keyword highlighting and structured lists
Responsive HTML document generator with modern styling:
- Tailwind CSS Integration: Responsive design out of the box
- Custom Font Integration: Patrick Hand font for improved readability
- Section-based Structure: Organized content presentation
- Responsive Layout: Adapts to different screen sizes
- Semantic HTML: Proper heading hierarchy and list structures
- Custom Styling:
- Consistent typography
- Proper spacing and margins
- Interactive elements styling
- 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.