No announcement yet.

Caching Speech routines using Amazon Polly

  • Filter
  • Time
  • Show
Clear All
new posts

    I tried run the command

    touch /tmp/tts.debug
    I can not find any files.

    and when I log in to the RPI as pi@192.xxxxxxxxx I only see PollyC folder.

    and this is the files in folder

    01settings LICENSE Makefile PollyC.py3


      The files under user pi aren't used after they're installed into the HomeSeer folder.

      Run these commands and post results

      ls -l /tmp
      cd /usr/local/HomeSeer    # or where you've installed HomeSeer
      ls -ld PollyC*
      ls -l


        this is what I got from the commands

        pi@HS3Pi3v6:~ $ ls -l /tmp
        total 120
        -rw-r--r-- 1 root root 118784 Jul 5 17:06 HomeSeerLog.hsd
        drwx------ 3 root root 4096 Jul 5 13:17 systemd-private-b7dcb8e9e63d42af806c57becbc1286a-systemd-timesyncd.service-Fucqfd
        pi@HS3Pi3v6:~ $ cd /usr/local/HomeSeer
        pi@HS3Pi3v6:/usr/local/HomeSeer $ ls -ld PollyC*
        drwxr-xr-x 2 root root 4096 Jun 30 14:49 PollyCache
        -rw------- 1 root root 205 Jun 28 12:50 PollyC.keys
        -rwxr-xr-x 1 root root 7886 Jun 28 12:06
        -rwxr-xr-x 1 root root 7883 Jun 28 12:06 PollyC.py3
        pi@HS3Pi3v6:/usr/local/HomeSeer $ ls -l
        -rwxr-xr-x 1 root root 1840 Jun 28 12:06


          Referring back to post #75, first step is to execute

          touch /tmp/tts.debug
          This command creates an empty file /tmp/tts.debug. From your posting of the contents of /tmp, this file is absent. Run that command, trigger the speak action, then check /tmp again and you should see the file 'speak_to_file.log'. Post the contents of that, except for the key info.

          Note that the /tmp directory gets cleared by the Linux operating system upon reboot, so anything there will be gone once you do that.

          From the other commands, the installation looks good.


            alright got it do not seem to be good

            pi@HS3Pi3v6:/tmp $ cat speak_to_file.log
            Warning: metatag <voice-id"mads"> ignored
            Traceback (most recent call last):
            File "/usr/local/HomeSeer/./PollyC.py3", line 194, in <module>
            File "/usr/local/HomeSeer/./PollyC.py3", line 142, in main
            UnicodeEncodeError: 'utf-8' codec can't encode character '\udcc3' in position 18: surrogates not allowed
            /usr/local/HomeSeer/html/Sonos/Announcements/Ann_ALL_0.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 16000 Hz


              This indicates it's having trouble encoding the text string (which it does to create the cache hash key). What phrase are you trying to send?

              Also, appears that the initial voice-id tag is malformed:

              Warning: metatag <voice-id"mads"> ignored
              Format for this should be
              looks like it might be miising the "=" character.


                all right now it is working before you answer I also tried change my location us/newyork in homeseer

                not sure if it did the trick and change another region in the polly config. (yours)

                and I saw the error about "=" but it did not work before where I had the right format.

                but do now.

                Region: us-west-1
                Key ID: xxxx
                Key: xxxx
                Text: rødgrød med fløde
                Voice: Naja
                Format: mp3
                Text Type: text
                Polly Output: /tmp/speak_to_file1491.mp3
                Cache File: /usr/local/HomeSeer/./PollyCache/6e6d0612e4f6adc98ee3a072426fb52ddcdb0673086cb3212f65428a2e46 ca1a69c2dfcb9d95e7143f57ccd8092fc19dcbe0673f63c7bd41703b90db 267bdef7.mp3
                Cache Hit: False
                /usr/local/HomeSeer/html/Sonos/Announcements/Ann_ALL_0.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz


                  Looks good.

                  Interesting about the region. What were you using before that didn't work?


                    in homeseer setup : DK Europe/copenhagen in Polly setup eu-central-1

                    but again not sure if it was the solution maybe I try change back later. to check.


                      zwolfpack are you running homeseer on ubuntu ?
                      if desktop or server ?

                      my setup with the working polly is RPI 3 and the homeseer image for raspberry (5 plugin)

                      i have tried setup a VM with ubuntu 20.xx desktop

                      but when I want to install polly I get this

                      E: Unable to locate package python-pip make: *** [Makefile:50: install-pip] Error 100
                      i have installed and update both python 3 and 2 and also done maybe 10 guides on how to fix this "PIP" error.

                      but still same errors.


                        I have a test installation on a raspberry pi, that I used to help Timon develop part of the PollyC package. My real HS is running on Windows, which doesn't run PollyC of course.


                        Try editing the Makefile and on line 50, delete "python-pip", leaving only "python3-pip". Python2 apparently isn't supported anymore, but PollyC will use python3 instead.

                        You make need to delete line 54 as well, not sure.


                          ok thanks ill try

                          so it is not possible to use polly on windows with homeseer at the moment ?


                            Originally posted by koburg View Post
                            so it is not possible to use polly on windows with homeseer at the moment ?
                            No, on Windows the speech setup is totally different. They don't provide a "hook" like the script.

                            I bought a package of Ivona voices a few years back, from here (iirc). I think Amazon may have absorbed Ivona, and now those voices are available as Polly voices.