<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>MeloTTS on Prateek Sharma</title>
		<link>https://prateeksharma.me/tags/melotts/</link>
		<description>Recent content in MeloTTS on Prateek Sharma</description>
		<generator>Hugo</generator>
		<language>en-us</language>
		
		
		
		
			<lastBuildDate>Mon, 23 Jun 2025 00:00:00 +0000</lastBuildDate>
		
			<atom:link href="https://prateeksharma.me/tags/melotts/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Audio Cloning</title>
				<link>https://prateeksharma.me/projects/audio-cloning/</link>
				<pubDate>Mon, 23 Jun 2025 00:00:00 +0000</pubDate>
				<guid>https://prateeksharma.me/projects/audio-cloning/</guid>
				<description>&lt;p&gt;This is an extension of the &lt;a href=&#34;https://prateeksharma.me/projects/video-translator/&#34;&gt;Video Translator&lt;/a&gt;&#xA; tool&#xA;that generates cloned audio for short subtitles, improving the quality of the&#xA;dubbed output. It uses &lt;a href=&#34;https://github.com/myshell-ai/OpenVoice&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenVoice&lt;/a&gt;&#xA; and&#xA;&lt;a href=&#34;https://github.com/myshell-ai/MeloTTS&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;MeloTTS&lt;/a&gt;&#xA; to clone the original speaker&amp;rsquo;s&#xA;voice.&lt;/p&gt;&#xA;&lt;h2 id=&#34;challenges&#34;&gt;Challenges&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;Library compatibility.&lt;/strong&gt; The libraries weren&amp;rsquo;t functional on Python 3.12,&#xA;which I was using — they worked on 3.10. So the TTS stage couldn&amp;rsquo;t live in the&#xA;same script as the rest of the pipeline.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Short subtitles.&lt;/strong&gt; The libraries needed a longer sample to clone a voice&#xA;well, and very short lines (&lt;code&gt;hello&lt;/code&gt;, &lt;code&gt;hi&lt;/code&gt;, &lt;code&gt;bye&lt;/code&gt;) errored out.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2 id=&#34;what-i-changed-in-the-fork&#34;&gt;What I changed in the fork&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;openvoice/se_extractor.py&lt;/code&gt; had a check that discarded audio segments shorter&#xA;than 1.5 seconds. Words like &lt;code&gt;hello&lt;/code&gt; fall under that. I relaxed the check to&#xA;allow segments down to ~0.5 seconds, and added a skip for lines too short to&#xA;process.&lt;/li&gt;&#xA;&lt;li&gt;Added &lt;code&gt;melo-tts&lt;/code&gt; to &lt;code&gt;requirements.txt&lt;/code&gt; (the docs mention it but don&amp;rsquo;t pin it).&lt;/li&gt;&#xA;&lt;li&gt;Added a driver script that points at a &lt;code&gt;video-translator&lt;/code&gt; output folder and&#xA;runs cloning across every generated audio file.&lt;/li&gt;&#xA;&lt;li&gt;Patched the library to run on CPU for Apple M1.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The fork is at &lt;a href=&#34;https://github.com/pratts/OpenVoice&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;github.com/pratts/OpenVoice&lt;/a&gt;&#xA;;&#xA;&lt;code&gt;test1.py&lt;/code&gt; runs the cloning over the translator&amp;rsquo;s output.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
