Soft Serve Direct
ROGER DAVIES MAGRATH, AB CANADA
  • Home
    • Twitter
  • inMagrath152
  • News
    • MagrathOpen Wifi
    • Pharmacy
  • Contact Us
    • Map
    • Phone
  • Search
  • Favorites
    • Magrath Chamber of Commerce
    • Magrath Lions Club
    • Magrath Museum

Tutorial: Text to Speech Recording 101

12/9/2016

1 Comment

 
So, recently I decided it would be neat to have the computer read me back a talk I had written and given. I suppose I could just record it by reading it aloud into a microphone, but that would get tedious and who likes to hear their own voice? Why can't a Siri-like voice could read it for me? Hmm
Picture
I did this on a Ubuntu Linux desktop computer, but I suppose you might be able to do similar things on another system .. but I leave that to you. This tutorial is mostly to document for myself what steps I took to accomplish this task - so that I might be able to repeat my success sometime in the future. It presumes an intermediate level of computer knowledge.

Basically, I wanted the computer to speak the written text to my speakers, and then capture that output directly back into a audio recording program and output the result into an mp3 or ogg audio file. Can we do it? Sure!

Step one: I wrote out the text. In this case, I had done this earlier in preparing to give my talk, one I recently gave as church talk and had concurrently posted on my talk archive blog (in text format). But how to convert those written words back to a spoken form, somewhat automatically?
  • I use free open source Libreoffice text processor, but any text editor would do.
  • For my  blog I use Weebly .. but that is for another tutorial ..

Picture
Step two: I cut and paste the text into the free (and magic) online website form at ​ttsreader.com advertized as: "A [text to speech] web app that works great both on Chrome and Safari. No need to download or install. No annoying login either. Simply paste the text and click "play". Sweet! Cut, paste, click play, listen .. so far so good.
  • Two 'voices' are available in the English language - a male british Mr French type and a female american Siri type. Neither is much like my own voice .. but perhaps that is for the best. At least they were only slightly robotic sounding from time to time.

  • Do not expect this page to translate from one language to another (maybe you can do that with Google Translate - kind of .. using cut and paste) . Just know that if you choose a 'voice' other than English all you get is gr-english as read by someone with a very bad foreign accent .. unless that is what you wanted.
  • I had to edit the text 'hear' and there so that the result would sound out properly for certain uncommon words .. eg knee-fight vs nephite. Also with scripture references, while (Isaiah 58:13) is read properly as "Isaiah chapter 58 verse 13" less common (LDS) scripture references like (D&C 88: 63) were read as "D and C 88 point 63".  Changing it to (D&C 88:  63) ie adding a space improved it slightly to "D and C 88 [slight pause] 63" as a person might read it out loud. Other than that, it did a great job reading back my text (even all the typo's).
Picture
Step three: Install and run the audio capture program. I like the free open source Audacity program. On my computer I just find and install it using the Ubuntu Software app or in Terminal I could just type "sudo apt-get install audacity" ..
  • with Audacity running, now I need to remap the audio being output from the Chrome ttsreader.com website back into something Audacity can see (or in this case 'hear')

  • from Terminal I install and run the pavucontrol helper program. First I use "sudo apt-get install pavucontrol" to install and then just "pavucontrol" to run it.
  • Then back in Audacity, I select the new microphone input as "default: Front Mic: 1" (ie the one added by pavucontrol) and now see the sound activity bar moving. Yay.
3Step four: This took a little coordination; but I got the ttsreader page in Chrome ready to play by moving the cursor to the top of the text box and selecting the desired 'voice' and in a second window I got the Audacity program ready to record by opening up a blank workspace, and then I first clicked "record" in Audacity (the red circle icon) and then clicked "play" in ttsreader (the big green right arrow icon).  Voila the sweet sound of success!
  • the resulting OGG version is about 1/3 the size of the MP3 version (ie 6MB vs 9MB for a 15 minute recording) however, the MP3 format is a bit more supported .. currently.
Final step: Save the results. In Audacity, I click File > Export Audio and select the format eg MP3 and a name and destination (remember the folder where you are saving it to).  Easy peasey.
  • This is what I started with: rogerdavies.net/talk-archive/talk-three-sacred-places-homes-chapels-temples-sc-sep-2016
  • And this was the result: in a male Mr French version talk-three-sacred-places-sep2016-enm.mp3
  • or in a female Siri version talk-three-sacred-places-sep2016-enf.mp3
1 Comment
julie link
2/5/2017 08:00:27 pm

thank you for text to speech learning tuto

Reply

Your comment will be posted after it is approved.


Leave a Reply.

    Author

    Roger Davies of ssdirect.com

    Archives

    January 2022
    March 2020
    January 2020
    December 2019
    November 2019
    April 2019
    March 2019
    January 2019
    September 2018
    April 2018
    January 2018
    July 2017
    October 2016
    September 2016
    December 2015
    October 2015
    September 2015
    June 2015
    May 2015
    December 2014
    November 2014
    October 2014
    May 2014
    April 2014
    March 2014
    October 2013
    April 2013
    March 2013
    February 2013
    June 2012
    May 2012
    April 2012
    February 2012
    January 2012
    November 2011
    October 2011
    May 2011
    April 2011
    March 2011
    February 2011
    November 2010
    September 2009
    November 2008
    February 2007

    Categories

    All
    Accounting
    Email
    Family Safe
    Hardware
    Internet
    Linux
    Software
    Wifi

    RSS Feed

Powered by Create your own unique website with customizable templates.