<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Davkharbayar</title>
    <description>The latest articles on Forem by Davkharbayar (@davkharbayar).</description>
    <link>https://forem.com/davkharbayar</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1252011%2F9f34f08f-82c9-41da-be20-32845cd91e73.jpeg</url>
      <title>Forem: Davkharbayar</title>
      <link>https://forem.com/davkharbayar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/davkharbayar"/>
    <language>en</language>
    <item>
      <title>Generate Subtitles for Audio and Video Easily with AssemblyAI Speech-to-Text</title>
      <dc:creator>Davkharbayar</dc:creator>
      <pubDate>Fri, 22 Nov 2024 18:27:48 +0000</pubDate>
      <link>https://forem.com/davkharbayar/generate-subtitles-for-audio-and-video-easily-with-assemblyai-speech-to-text-9n6</link>
      <guid>https://forem.com/davkharbayar/generate-subtitles-for-audio-and-video-easily-with-assemblyai-speech-to-text-9n6</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/assemblyai"&gt;AssemblyAI Challenge &lt;/a&gt;: Sophisticated Speech-to-Text.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;Subtitles are critical for improving accessibility, engagement, and global reach for videos and audio. As a content creator and developer, I often faced challenges when generating subtitles manually. I wanted an automated, tech-driven solution that could handle this process efficiently.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://subtitler-58b2c21658a1.herokuapp.com/" rel="noopener noreferrer"&gt;Live Demo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Davkharbayar/subtitler" rel="noopener noreferrer"&gt;Code&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg761pzklr7ljdspliudd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg761pzklr7ljdspliudd.png" alt="Image description" width="800" height="362"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Home screen&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fofjqqu6jfpegemoh4pwh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fofjqqu6jfpegemoh4pwh.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;mp3 file create subtitle&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9cguk4ucdofl5vzt8k36.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9cguk4ucdofl5vzt8k36.png" alt="Image description" width="800" height="593"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;create SRT file&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Journey: Incorporating Universal-2, AssemblyAI's Speech-to-Text Model into My Application&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Starting Point: The Problem&lt;/p&gt;

&lt;p&gt;Manually creating subtitles for audio and video files was a tedious and time-consuming task. It required listening to recordings, transcribing speech into text, and carefully syncing subtitles with audio. For long or complex recordings, this process was not only error-prone but also impractical.&lt;/p&gt;

&lt;p&gt;I envisioned building an automated solution that could handle this entire workflow seamlessly. The goals were ambitious yet practical:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Objectives&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Accurately Transcribe Speech into Text&lt;/strong&gt;&lt;br&gt;
Leverage AI to precisely convert spoken words into text, even in noisy or multi-speaker environments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Generate Subtitles in Popular Formats like SRT&lt;/strong&gt;&lt;br&gt;
Ensure compatibility with platforms like YouTube, social media, and video editing software.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Create Subtitled Videos Using FFMPEG&lt;/strong&gt;&lt;br&gt;
Integrate the subtitles directly into video files, saving users the hassle of separate configurations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Add Subtitles with a Background for Audio Files&lt;/strong&gt;&lt;br&gt;
For users with audio-only content, generate a video with subtitles displayed on a beautiful, customizable background.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Enhance Content with Thumbnail Images and Animated WebP Files&lt;/strong&gt;&lt;br&gt;
Utilize FFMPEG to create visually engaging thumbnail images and lightweight, animated WebP files for promotional use.&lt;/p&gt;

&lt;p&gt;The Solution&lt;br&gt;
To achieve these goals, I combined AssemblyAI's Universal-2 Speech-to-Text model with the powerful media-processing capabilities of FFMPEG. The workflow ensures speed, accuracy, and flexibility, making it ideal for content creators, educators, and businesses alike.&lt;/p&gt;

&lt;p&gt;Tools Used&lt;br&gt;
Here’s an overview of the tools and technologies that powered this project:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. AssemblyAI&lt;/strong&gt;&lt;br&gt;
Role: Core transcription engine.&lt;br&gt;
Features Used:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Transcription API: Converts audio and video into text with high accuracy, providing timestamps, speaker diarization, and punctuation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Sentence API: Extracts transcription data at the sentence level, making it easier to format and sync subtitles.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Node.js (Express and EJS Engine)
Role: Backend server and template engine.
Features Used:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Express.js: Built the API endpoints for handling user requests, file uploads, and processing workflows.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;EJS Template Engine: Rendered dynamic web pages for the user interface, allowing seamless file uploads and result display.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;FFMPEG
Role: Media processing and editing.
Features Used:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Subtitled Videos: Burned SRT subtitles directly into video files.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Audio-to-Video Conversion: Added subtitles to audio files by generating a video with a custom background.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Thumbnail Generation: Captured still images from videos for thumbnails.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Animated WebP Files: Created lightweight animations for social media or marketing.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Final Thoughts&lt;/strong&gt;&lt;br&gt;
Building an automated subtitle generator using AssemblyAI and FFMPEG was both an exciting challenge and a rewarding journey. By integrating state-of-the-art speech-to-text technology with powerful media processing tools, I was able to create a solution that simplifies subtitle creation, enhances accessibility, and delivers professional results effortlessly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Takeaways&lt;/strong&gt;&lt;br&gt;
The Power of AI: AssemblyAI’s Universal-2 model proved to be a game-changer, offering high accuracy and advanced features like speaker diarization and timestamping.&lt;br&gt;
&lt;em&gt;Automation Matters:&lt;/em&gt; Automating tedious tasks like transcription and subtitle generation saves time and eliminates errors, making life easier for content creators and professionals.&lt;br&gt;
FFMPEG’s Versatility: Whether it’s burning subtitles into videos, adding visuals to audio, or creating animated media, FFMPEG brought flexibility and polish to the project.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9vph9i47s0q6txy8nuqe.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9vph9i47s0q6txy8nuqe.jpeg" alt="Image description" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>assemblyaichallenge</category>
      <category>ai</category>
      <category>api</category>
    </item>
    <item>
      <title>AI-Powered CV Analysis Platform</title>
      <dc:creator>Davkharbayar</dc:creator>
      <pubDate>Sun, 10 Nov 2024 08:21:42 +0000</pubDate>
      <link>https://forem.com/davkharbayar/ai-powered-cv-analysis-platform-1p48</link>
      <guid>https://forem.com/davkharbayar/ai-powered-cv-analysis-platform-1p48</guid>
      <description>&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;The AI-Powered CV Analysis Platform is a groundbreaking tool that connects job seekers and employers through the power of artificial intelligence. With this platform, users can upload their resumes and job advertisements to receive a detailed analysis. It provides real-time insights, practical recommendations, and personalized guidance to enhance career prospects. Moreover, it helps users discover suitable job opportunities tailored to their skills and experiences, making the job search process smarter and more efficient.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://ai-cv-analyze-53c45a6064cc.herokuapp.com/" rel="noopener noreferrer"&gt;Live Demo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Davkharbayar/ai-cv-analyze" rel="noopener noreferrer"&gt;Repo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://youtu.be/jcGJFr5eqvc" rel="noopener noreferrer"&gt;Video&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe8jukdj9dxxxtl1aeffs.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe8jukdj9dxxxtl1aeffs.PNG" alt="Home page job list" width="800" height="375"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Home Page Job List: Explore tailored job opportunities directly from the platform's homepage.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flmn47lv7fxmp2txr8a8m.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flmn47lv7fxmp2txr8a8m.PNG" alt="JOb Detail" width="800" height="403"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Job detail&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw5lc58vyftapjv370za1.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw5lc58vyftapjv370za1.PNG" alt="Resume analysis in progress: Turning your CV into actionable insights for better job opportunities." width="800" height="393"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Resume analysis in progress: Turning your CV into actionable insights for better job opportunities.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqu2cb19lxjxc7s6png6f.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqu2cb19lxjxc7s6png6f.PNG" alt="AI Suitability Score and Proficiency Levels: Matching your CV to the perfect job with precision and insights." width="800" height="387"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;AI Suitability Score and Proficiency Levels: Matching your CV to the perfect job with precision and insights.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu6zvmydmij7xom48f3i7.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu6zvmydmij7xom48f3i7.PNG" alt="Discover similar job opportunities tailored to your skills and experience." width="800" height="141"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Discover similar job opportunities tailored to your skills and experience.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Tools Used
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;TimescaleDB&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Used as the primary database for efficient management and retrieval of document and job-related data.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;PGAI&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Acts as a core database for document storage and processing. It provides the foundation for managing AI-related data integrations.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;pgvector&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Utilized to store vector embeddings of documents, enabling advanced AI-driven search and similarity matching.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;pgvectorscale&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Employed to create indexes on the vector embeddings, optimizing performance for vector similarity queries and enhancing the search experience.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;OpenAI API&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Powers the AI capabilities for document analysis, embedding generation, and providing intelligent insights and recommendations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tech Stack
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Backend
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Node.js&lt;/strong&gt;: Server-side runtime environment.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Express.js&lt;/strong&gt;: Web framework for building server logic and handling routing.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Frontend
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;EJS (Embedded JavaScript)&lt;/strong&gt;: Used to render dynamic HTML pages. Combines server-side data with frontend templates for seamless integration.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Database
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;TimescaleDB&lt;/strong&gt;: Primary database for managing and retrieving document data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PostgreSQL&lt;/strong&gt;: Base relational database supporting structured queries.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;pgvector&lt;/strong&gt;: For storing document embeddings.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;pgvectorscale&lt;/strong&gt;: To create and optimize indexes for vector searches.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Building the AI-Powered CV Analysis Platform has been an incredible journey, blending traditional database systems with cutting-edge AI capabilities. At first, the idea of integrating advanced AI, like embedding models and similarity searches, directly within the database seemed unconventional. However, as I delved deeper into the project, I realized how transformative this approach could be, especially for simplifying workflows for non-technical users like recruiters and HR professionals.&lt;/p&gt;

&lt;p&gt;What excites me most about this project is how it bridges the gap between technical complexity and user-friendly solutions. By utilizing tools like TimescaleDB, pgvector, and OpenAI's API, we've created a system that can streamline CV analysis and job matching without the need for external AI frameworks. This approach not only simplifies integration but also ensures faster, more efficient insights directly from the database.&lt;/p&gt;

&lt;p&gt;One of the highlights of this experience was learning to optimize PostgreSQL with extensions like pgvector, and creating a seamless interaction between AI embeddings and SQL queries.&lt;/p&gt;

&lt;p&gt;This project has shown me that innovation often lies in reimagining familiar tools in new contexts—and that AI-powered solutions can democratize access to advanced analytics in ways we’re just beginning to explore.&lt;/p&gt;

&lt;p&gt;Working with &lt;strong&gt;TimescaleDB&lt;/strong&gt; felt like discovering an exciting new frontier in data management.&lt;/p&gt;

&lt;p&gt;TimescaleDB made it feel like the limitations of traditional databases could be overcome without compromising on performance or scalability. Its integration into this project enabled a seamless flow of AI-powered insights, reinforcing the idea that innovation is as much about leveraging the right tools as it is about having the right ideas.&lt;/p&gt;

&lt;p&gt;This project has shown me that innovation often lies in reimagining familiar tools in new contexts—and &lt;strong&gt;TimescaleDB&lt;/strong&gt; was instrumental in pushing those boundaries. It turned what seemed like a technical challenge into an exciting opportunity to create something truly transformative.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>pgaichallenge</category>
      <category>database</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
