Announcement

Collapse
No announcement yet.

How to get better voice audio from device?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to get better voice audio from device?

    I have the device announce "sunset time" and it sounds pretty creepy through the speaker that I have connected to the audio port of my HomeSeer HomeTroller Zee S3. How do I improve?

    Use plugins? Possible to play through Google Home Speaker (that would be great!)? Other speaker types? Play my own mp3 or wav rather than rely on TTS?

    WHAT I TRIED: I found some online service that converts text to speech and provides downloadable MP3 or WAV, doing a better job at text-to-speech (TTS) than the Raspberry PI. But not sure how to get the file on the PI. The HS3 web interface allows me to point to a file and presents me with what look to be folders local to the PI hardware. When I set custom images for my Z-wave devices, I was able to point to URL and that worked. Doing so for audio files says "file does not exist" so I assume I need to get the file on the PI. How do I do that??

    How can I get files on the HomeTroller? And how do I get best speech audio?

    Thanks!

    #2
    Here continue to utilize Microsoft SAPI for both HS3 Pro / HS3 Lite on Ubuntu Linux.

    I utilize an Oracle Virtual Box running Microsoft 32bit / SAPI / multiple voices / multiple speaker dot exe instances which connect to the two Linux boxes.

    I do the same with the Microsoft tablet top tablets running HSTouch and Speaker. Each of the speaker instances can utilize a unique speech font.

    Note this is for speech on the home network. It is not mobile smartphone speech.
    - Pete

    Auto mator
    Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
    Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
    HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

    HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
    HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

    X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

    Comment


      #3
      Pete, thanks for feedback though I am not sure I understand. Are you saying you have installed Windows via a VM on the PI, and using the better TTS available in Windows?

      Sounds more complicated than I was hoping for...

      Can I copy mp3s to the PI device? (Need to take out the SD card and then copy the files to some local directory?) I think that may be easier for me to do.

      Or can I have the audio somehow to play on my Google Home speaker? Or maybe plug some USB device in the PI and get better TTS audio through that?

      Comment


        #4
        Are you saying you have installed Windows via a VM on the PI, and using the better TTS available in Windows?

        Homeseer text to speech has it's roots in Microsoft SAPI. SAPI is the text to speech and voice recognition engine for Microsoft that has been around since the early days of Windows.

        No Oracle Virtual box will no work on the Pi. Speaker dot exe on any windows box will speak for the Homeseer 3 lite running on the Pi. I picked the HS3 Pro Linux box with 16Gb of RAM to provide the speaker dot exe for the Pi. It is just a thin VM of 32 bit Windows.

        On the touchscreen tablets it is Windows embedded.

        With Homeseer touch to iOS / Android / Windows there are wav files generated on the clients which are sent over to the clients via the mothership (RPi).

        Only the speaker dot exe generates true SAPI voices. Everything else is just a wave file coming from the mothership.

        Using a USB sound card is just that. You can direct sound to the USB sound card but it will not really be any different from the source TTS on the RPi.

        Linux TTS while it works fine is very robotic sounding; same as in the early 1980's.
        - Pete

        Auto mator
        Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
        Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
        HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

        HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
        HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

        X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

        Comment


          #5
          Have you looked into sonos?

          Comment


            #6
            @Pete, I think I understand what you are saying though I am doing some guesswork here and there.

            @integlikewhoa, Sonos would be overkill for waht I need. I already have speakers to provide multi-room audio.

            My Pi is in the Living Room and I want it to announce when sunset is (and then also trigger my "sunset" light scene). My Pi is linked to a simple speaker (like one you would connect your laptop to) and that I keep always on, dedicated to the Pi. But the voice is pretty creepy...

            HERE IS WHAT I ENDED UP DOING

            I found two better TTS services online:
            https://www.ibm.com/watson/services/text-to-speech/
            http://www.fromtexttospeech.com/

            But I could only download MP3 file. So then I used Audacity on my PC to convert MP3 to WAV. Then uploaded to my Pi and use the "play audio file" command.

            I assume this is the best process, unless I rely on a PC+speaker or mobile device to be always on and listening.

            Am I missing something?

            Comment


              #7
              The pi runs Linux. I cannot find any Linux text to speech voices that don't sound terrible. Your only choices are to use some sort of cloud based nonsense or run a copy of windows somewhere and use a homeseer speaker client to talk through Microsoft SAPI voices.
              https://forums.homeseer.com/forum/de...plifier-plugin

              Comment


                #8
                @appnatious1,

                I have HomeSeer Speaker running on a PC in my office that is on most of the time. The audio comes from the speaker that I have connected to that PC. Is there a way to get some sort of remote speaker (that I can place in the living room) that will get the audio coming from the PC in the office upstairs?

                Maybe a "siren" or a "doorbell chime" z-wave devices??? (though not sure if z-wave can do this, have a speaker device be able to play audio from another device...)

                Comment


                  #9
                  You could run a wireless bluetooth or generic wireless speaker from the Homeseer Speaker running on the PC in your office. No moving parts or plugins necessary.

                  I do not think that you can do wireless audio with ZWave.

                  Amazon has a Wireless bluetooth basics speaker for $17.99

                  AmazonBasics Portable Wireless Bluetooth Speaker - Black

                  [ATTACH]63887[/ATTACH]

                  Here do an hourly TTS chime with indoor / outdoor temperatures, garage door open tts, doorbell TTS, et al (years now).
                  - Pete

                  Auto mator
                  Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
                  Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
                  HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

                  HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
                  HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

                  X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

                  Comment


                    #10
                    Originally posted by Strategerizer View Post
                    Use plugins? Possible to play through Google Home Speaker (that would be great!)?
                    You can try Spud's excellent Chromecast plugin to get TTS output onto your Google Home speaker. It's in beta, but I am using it and it's very stable

                    https://forums.homeseer.com/showthre...ght=chromecast

                    A relatively easy replacement for the default Linux FLite TTS is Voice RSS. Albeit, it is a free cloudbased service, so your mileage may vary. I am using it and have not had any problems with it. You only get one female voice to use (can choose accents, eg. US, AU, etc), but it is a lot better than any of the FLite options.

                    http://www.voicerss.org/api/documentation.aspx

                    To setup Voice RSS on your Zee S2, you need to:
                    1. Register an account with Voice RSS to get an API key.
                    2. Install mpg123 on your Zee S2 from a SSH terminal like Putty. Run this command 'sudo apt-get install mpg123'
                    3. Replace the contents of the 'speak_to_file.sh' in the HomeSeer directory on your ZeeS2 (/usr/local/HomeSeer) with the following script. Make a backup of the original file in case you want to revert to using the default FLite voices. Insert the API key you are provided with in step 1 in the last line of the script where it says 'Your_API_Key'.

                    Obviously not my script. All credit to the script writer, Dan.
                    #!/bin/bash
                    #################################
                    # Speech Script by Dan Fountain #
                    # TalkToDanF@gmail.com #
                    #################################


                    INPUT=$2
                    STRINGNUM=0

                    ary=($INPUT)
                    echo "---------------------------"
                    echo "Speech Script by Dan Fountain"
                    echo "TalkToDanF@gmail.com"
                    echo "---------------------------"
                    for key in "${!ary[@]}"
                    do
                    SHORTTMP[$STRINGNUM]="${SHORTTMP[$STRINGNUM]} ${ary[$key]}"
                    LENGTH=$(echo ${#SHORTTMP[$STRINGNUM]})
                    #echo "word:$key, ${ary[$key]}"
                    #echo "adding to: $STRINGNUM"
                    if [[ "$LENGTH" -lt "100" ]]; then
                    #echo starting new line
                    SHORT[$STRINGNUM]=${SHORTTMP[$STRINGNUM]}
                    else
                    STRINGNUM=$(($STRINGNUM+1))
                    SHORTTMP[$STRINGNUM]="${ary[$key]}"
                    SHORT[$STRINGNUM]="${ary[$key]}"
                    fi
                    done

                    for key in "${!SHORT[@]}"
                    do
                    #echo "line: $key is: ${SHORT[$key]}"

                    echo "Playing line: $(($key+1)) of $(($STRINGNUM+1))"
                    NEXTURL=$(echo ${SHORT[$key]} | xxd -plain | tr -d '\n' | sed 's/\(..\)/%\1/g')
                    mpg123 -w $1 -q "http://api.voicerss.org/?key=Your_API_Key&f=48khz_8bit_stereo&hl=en-gb&src=$NEXTURL"
                    done
                    Hope this helps. Enjoy.
                    Last edited by ; October 13, 2017, 11:33 PM.

                    Comment


                      #11
                      Originally posted by Strategerizer View Post
                      I found two better TTS services online:
                      https://www.ibm.com/watson/services/text-to-speech/
                      Out of curiosity, I had a quick look at Watson. It is a pay-as-you-go service, but it looks reasonable for light use as in my case. Quote "$0.02 USD/THOUSAND CHAR". First million characters are free!

                      So looking into it further, it seems to use a combination of Post and Get commands to produce wave files on the fly.

                      https://console.bluemix.net/docs/ser...g-started.html

                      But I have no idea of how one might integrate that into HS TTS system to get output from a 'Say Something' event action. Anyone have any ideas, or better still a working script?
                      Last edited by ; October 14, 2017, 02:40 AM.

                      Comment


                        #12
                        There are several ways to get an MP3 file into the Media folder on the Zee S2. The easiest is right on the event page. If you select to "Play an Audio File" one of your options in selecting the file is an "Upload a File" button. Which lets you select a file from the PC you are browsing from and uploads it to the Zee S2.

                        The problem I'm working on right now is that MP3 files that play just fine through an HSTouch client play only as static on speakers connect to the Zee S2 audio port. I assume I need to change the MP3 file to a format compatible with the player on the Zee but haven't found the specs yet.

                        Comment


                          #13
                          From from what I remember the wave file format, .wav, worked for me.

                          Comment


                            #14
                            bluetooth speaker and tablets?

                            Originally posted by Pete View Post
                            You could run a wireless bluetooth or generic wireless speaker from the Homeseer Speaker running on the PC in your office. No moving parts or plugins necessary.

                            I do not think that you can do wireless audio with ZWave.

                            Amazon has a Wireless bluetooth basics speaker for $17.99

                            AmazonBasics Portable Wireless Bluetooth Speaker - Black

                            [ATTACH]63887[/ATTACH]

                            Here do an hourly TTS chime with indoor / outdoor temperatures, garage door open tts, doorbell TTS, et al (years now).

                            Pete have you ever tried a bluetooth speaker connected to a tablet running HSTouch?

                            Comment


                              #15
                              No.

                              Use an optical out going to the AVR in the master bedroom for master bathroom speakers.

                              I do not see why a bluetooth speaker wouldn't work.
                              - Pete

                              Auto mator
                              Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
                              Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
                              HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

                              HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
                              HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

                              X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

                              Comment

                              Working...
                              X