Have You Ever Wished You Could Chat With Your Favorite Tech YouTuber Anytime?🤯

I just built something that might blow your mind.
What Exactly Is TubePersona? 🚀
TubePersona is an AI-powered Flutter app that doesn't just talk about your favorite tech YouTubers – it becomes them.
🎭 Three Unique Experiences:
1. Chat with "Hitesh Persona"
Get that classic "चाय और कोड" teaching vibe
Patient, step-by-step explanations in Hinglish
Perfect for when you need gentle guidance
2. Chat with "Piyush Persona"
Great for when you want quick, practical advice
That signature "बहुत बढ़िया" enthusiasm
3. Create Your Own YouTuber Persona
This is where it gets INSANE 🤯
Paste ANY YouTube video URL
The app automatically fetches the transcript (if available)
AI learns their speaking style, phrases, and personality
Chat with AI that mimics ANY tech YouTuber!
The Technical Magic Behind the Scenes ⚡
It is a flutter application with the gemini integration in it so for the Hitesh and Piyush Persona i have hardcoded the transcripts of more than 500 lines of each of them and also provided the flexibility if you want to train more you can go with the third option you can provide as many links as possible and it will be getting trained better.
For the transcription its sending the video id to the backend and if the video has auto-generated subtitles then the backend will return the transcript and it will be getting stored in the Shared Preferences.
Google Gemini 2.0 Flash Integration
Lightning-fast responses
Context-aware conversations
Maintains personality throughout long chats
Local Storage Magic
Your custom personas are saved locally(Saving the transcripts)
No data leaves your device unnecessarily
Code Part
Gemini Integration in Flutter
class GeminiService {
static const String _baseUrl = 'https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent';
final String _apiKey;
GeminiService({required String apiKey}) : _apiKey = apiKey;
Future<String> generateResponse({
required String systemPrompt,
required String userMessage,
required List<ChatMessage> chatHistory,
}) async {
try {
// Replace transcript placeholder with actual data
String finalSystemPrompt = systemPrompt;
if (systemPrompt.contains(AppConstants.transcriptPlaceholder)) {
final transcriptData = await SharedPreferencesService.getFormattedTranscriptsForAI();
finalSystemPrompt = systemPrompt.replaceAll(AppConstants.transcriptPlaceholder, transcriptData);
}
// Build conversation context
final conversationBuffer = StringBuffer();
conversationBuffer.writeln(finalSystemPrompt);
conversationBuffer.writeln('\n=== CONVERSATION HISTORY ===');
// Add recent chat history
final recentHistory = chatHistory.reversed.take(AppConstants.maxChatHistory).toList().reversed;
for (var message in recentHistory) {
conversationBuffer.writeln('${message.isUser ? 'Human' : 'Assistant'}: ${message.content}');
}
conversationBuffer.writeln('\n=== CURRENT MESSAGE ===');
conversationBuffer.writeln('Human: $userMessage');
conversationBuffer.writeln('\nAssistant:');
final requestBody = {
"contents": [
{
"parts": [
{
"text": conversationBuffer.toString()
}
]
}
],
"generationConfig": {
"temperature": 0.9,
"topK": 1,
"topP": 1,
"maxOutputTokens": 2048,
}
};
final response = await http.post(
Uri.parse('$_baseUrl?key=$_apiKey'),
headers: {
'Content-Type': 'application/json',
},
body: jsonEncode(requestBody),
).timeout(const Duration(seconds: 30));
if (response.statusCode != 200) {
throw ApiException(
'Failed to generate response',
statusCode: response.statusCode,
);
}
final data = jsonDecode(response.body);
if (data['candidates'] == null || data['candidates'].isEmpty) {
throw ApiException('No response generated from AI');
}
final content = data['candidates'][0]['content']['parts'][0]['text'];
return content?.toString() ?? 'Sorry, I could not generate a response.';
} catch (e) {
debugPrint('Error generating AI response: $e');
throw ApiException('Failed to generate response: $e');
}
}
}
Future Scope
Currently in my mind there are some future scopes available that can be done
There should be option to create our specific persona and that will be saved separately currently all the transcripts are getting stored together. So in the future if i want to talk to Code with Harry i can create his persona and save his style.
UI Enhancements can be Done.
Code Quality need to be upgraded.
DEMO
Drive link with Video Demo and the apk:- https://drive.google.com/drive/folders/1CoOI3p4Qh71ESKtV8pKRxYOIdBcpoE2p?usp=share_link
Ever wished you could combine your favorite YouTubers into one super-advisor?
Subscribe to my newsletter
Read articles from Manus Gupta directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
