<?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>DEV Community: Tuidra</title>
    <description>The latest articles on DEV Community by Tuidra (@tuidra).</description>
    <link>https://dev.to/tuidra</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%2F3284435%2Ff3d11523-ac91-4b64-a381-f59283a86f26.png</url>
      <title>DEV Community: Tuidra</title>
      <link>https://dev.to/tuidra</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tuidra"/>
    <language>en</language>
    <item>
      <title>Auto-Generate Lyric Music Videos from MP3 with Python, Whisper, and Tuidra</title>
      <dc:creator>Tuidra</dc:creator>
      <pubDate>Sun, 22 Jun 2025 11:11:02 +0000</pubDate>
      <link>https://dev.to/tuidra/auto-generate-lyric-music-videos-from-mp3-with-python-whisper-and-tuidra-4m3k</link>
      <guid>https://dev.to/tuidra/auto-generate-lyric-music-videos-from-mp3-with-python-whisper-and-tuidra-4m3k</guid>
      <description>&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;This is a Python-based tool that automatically generates lyric-synced music videos from MP3 files. By combining high-precision speech recognition via OpenAI Whisper with real-time background rendering using GLSL shaders, you can easily create music videos with synchronized lyrics.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/tuidra/tuidra-musicvideo-maker" rel="noopener noreferrer"&gt;https://github.com/tuidra/tuidra-musicvideo-maker&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%2F6n3mnco5e926r8uluwxz.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%2F6n3mnco5e926r8uluwxz.png" alt="Image description" width="800" height="465"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🎤 About Tuidra
&lt;/h2&gt;

&lt;p&gt;This tool was created by &lt;strong&gt;Tuidra&lt;/strong&gt;, an AI-driven virtual singer-songwriter. Tuidra represents the creative fusion of humans and AI, promoting the integration of music, visuals, and technology.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;X (formerly Twitter): &lt;a href="https://x.com/Tuidra_AI" rel="noopener noreferrer"&gt;@Tuidra_AI&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;YouTube: &lt;a href="https://www.youtube.com/channel/UCYZeJLNA64_N53GzomnZ_sg" rel="noopener noreferrer"&gt;Tuidra Official Channel&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Experience a new form of creative expression, born from the collaboration of AI and humanity.&lt;/p&gt;




&lt;h2&gt;
  
  
  Key Features
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🎵 Automatic Lyric Sync via Speech Recognition
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;High-accuracy Japanese speech recognition using OpenAI Whisper&lt;/li&gt;
&lt;li&gt;Automatic matching between recognition results and user-provided lyrics&lt;/li&gt;
&lt;li&gt;Improved phonetic matching accuracy using Romaji conversion&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🎨 Real-time Shader Backgrounds
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Dynamic background rendering with GLSL shaders&lt;/li&gt;
&lt;li&gt;GPU acceleration via wgpu-shadertoy&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🎬 Flexible Video Composition
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Lyric overlay on existing video (Mode B)&lt;/li&gt;
&lt;li&gt;New video generation with shader background (Mode A)&lt;/li&gt;
&lt;li&gt;Support for watermark and title display&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Technical Implementation Details
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Speech Recognition Pipeline
&lt;/h3&gt;

&lt;p&gt;Use the &lt;code&gt;large&lt;/code&gt; model for best accuracy. For faster testing, the &lt;code&gt;small&lt;/code&gt; model is practical and effective.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Lyric Matching
&lt;/h3&gt;

&lt;p&gt;The system includes not only exact matches but also phonetic matching via Romaji conversion and partial matching with order constraints for natural alignment.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. GLSL Shader Integration
&lt;/h3&gt;

&lt;p&gt;Efficient GPU-based rendering enables the generation of high-resolution backgrounds for your music videos.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Video Composition
&lt;/h3&gt;

&lt;p&gt;Videos are composed using MoviePy, including lyric clip creation, scene merging, and audio integration in one streamlined process.&lt;/p&gt;




&lt;h2&gt;
  
  
  How to Use
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Basic Usage
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./make-mv-simple.sh audio.mp3 lyrics.txt watermark.png
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Advanced Options
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python video_generator.py input.mp3 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--mode&lt;/span&gt; A &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--shader&lt;/span&gt; shader/animated_galaxy.glsl &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--width&lt;/span&gt; 1920 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--height&lt;/span&gt; 1080 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--lyric-lines&lt;/span&gt; 3 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--lyric-position&lt;/span&gt; center &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--watermark&lt;/span&gt; logo.png &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--watermark-opacity&lt;/span&gt; 0.8
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Dependencies
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Python 3.8+&lt;/li&gt;
&lt;li&gt;OpenAI Whisper&lt;/li&gt;
&lt;li&gt;MoviePy&lt;/li&gt;
&lt;li&gt;wgpu-shadertoy&lt;/li&gt;
&lt;li&gt;pykakasi&lt;/li&gt;
&lt;li&gt;pandas / numpy / Pillow&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Implementation Notes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Japanese fonts are auto-detected and used for display&lt;/li&gt;
&lt;li&gt;Lyric display size is dynamically adjusted based on character count&lt;/li&gt;
&lt;li&gt;Includes fallback and error handling for Whisper recognition failures&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;This system enables automated generation of lyric-synced music videos for platforms like YouTube and SNS, combining speech recognition and real-time visual rendering. Developed under the name &lt;strong&gt;Tuidra&lt;/strong&gt;, it represents a new form of singer-songwriter powered by AI.&lt;/p&gt;




&lt;h2&gt;
  
  
  License
&lt;/h2&gt;

&lt;p&gt;MIT License&lt;/p&gt;




&lt;h2&gt;
  
  
  Contributions
&lt;/h2&gt;

&lt;p&gt;Pull requests are welcome. Please open an issue for major changes so we can discuss them first.&lt;/p&gt;




</description>
    </item>
  </channel>
</rss>
