<?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: Anand Kumar</title>
    <description>The latest articles on DEV Community by Anand Kumar (@anandraz).</description>
    <link>https://dev.to/anandraz</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%2F639242%2F0f93a7bc-2cce-4921-8c6d-11203ef30d6c.jpg</url>
      <title>DEV Community: Anand Kumar</title>
      <link>https://dev.to/anandraz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/anandraz"/>
    <language>en</language>
    <item>
      <title>Text To Speech | gTTs Python Module</title>
      <dc:creator>Anand Kumar</dc:creator>
      <pubDate>Sat, 16 Oct 2021 11:47:59 +0000</pubDate>
      <link>https://dev.to/anandraz/text-to-speech-gtts-python-module-5bfh</link>
      <guid>https://dev.to/anandraz/text-to-speech-gtts-python-module-5bfh</guid>
      <description>&lt;p&gt;Now a days TextToSpeech feature are used in various applications as android apps website and many more.&lt;br&gt;
python has couple of module which help us to integrate in our application with minimum instruction and easy to use.&lt;/p&gt;

&lt;p&gt;Python module for Text to Speech :&lt;/p&gt;

&lt;h2&gt;
  
  
  pyttsx3 2.90
&lt;/h2&gt;

&lt;p&gt;pyttsx3 is a text-to-speech conversion library in Python. Unlike alternative libraries, it works offline, and is compatible with both Python 2 and 3.&lt;/p&gt;

&lt;p&gt;type below command in terminal to install pyttsx3.&lt;br&gt;
&lt;code&gt;pip install pyttsx3&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;pyttsx3 python module has it own advantage as it work offline but it's output voice a bit not like human it's like robotic.  &lt;/p&gt;

&lt;p&gt;for more information &lt;a href="https://pypi.org/project/pyttsx3/" rel="noopener noreferrer"&gt;pyttsx3 Document&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;where as we have also alternative python module from Google.&lt;br&gt;
That's called &lt;strong&gt;gTTs&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  gTTS 2.2.3
&lt;/h2&gt;

&lt;p&gt;gTTS (Google Text-to-Speech), a Python library and CLI tool to interface with Google Translate's text-to-speech API. Write spoken mp3 data to a file, a file-like object (bytestring) for further audio manipulation, or stdout. Or simply pre-generate Google Translate TTS request URLs to feed to an external program.&lt;/p&gt;

&lt;p&gt;type below command in terminal to install gTTs&lt;br&gt;
&lt;code&gt;pip install gTTS&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;for more information &lt;a href="https://pypi.org/project/gTTS/" rel="noopener noreferrer"&gt;gTTs Document&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's try couple of examples...&lt;/p&gt;

&lt;p&gt;Text to speech in English language | gTTs&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fn936bxg07ab02c9b7rf8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fn936bxg07ab02c9b7rf8.png" alt="Text to speech in English language | gTTs"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Text to speech in Hindi language |gTTs&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fzb29ui5mhrr19tld5okb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fzb29ui5mhrr19tld5okb.png" alt="Text to speech in Hindi language |gTTs"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                            Thank You!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>python</category>
      <category>gtts</category>
      <category>texttospeech</category>
    </item>
  </channel>
</rss>
