Announcement

Collapse
No announcement yet.

Airplay Speak HS3 Linux Installation Guide

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Airplay Speak HS3 Linux Installation Guide

    Prerequisites:


    Connect to your Homeseer machine using ssh, and run the following command:
    Code:
    sudo apt-get update
    To auto discover the Airplay speakers on your network the plugin needs avahi-daemon to be installed and running (Avahi is the equivalent of Bonjour for Linux). On Zee2 or SEL it should already be installed and running, but if it's not run the following command:

    Code:
    sudo apt-get install avahi-daemon
    To resample audio files the plugin also needs avconv. (On some distributions avconv is not available in this case use ffmpeg instead)

    Code:
    sudo apt-get install libav-tools
    then from your HomeSeer directory (/usr/local/HomeSeer) edit the file speak_to_file.sh
    Code:
    sudo nano speak_to_file.sh
    and replace its content with the following (replace avconv by ffmpeg on the third line if necessary)
    Code:
    #!/bin/sh
    flite -o "$1_t" -t "$2"
    avconv -i "$1_t" -y -ar 44100 "$1"
    rm "$1_t"
    Let me know if you have any problem.
    Read the User Guide for more information.
    Last edited by spud; March 27, 2017, 07:48 AM.

    #2
    TTS works great

    I have installed the flite-hts voices which sound infinitely better than the builtin festival voices(Although still with some very occasional clicks and pops).
    However when I attempt to play a wav file(Signed 16 bit Little Endian, Rate 44100 Hz, Stereo) I get nothing. Also when I attempt to use a speak device from the weather.xml plugin I get nothing. Using the windows speaker client all is operational.

    Comment


      #3
      Originally posted by chimera View Post
      I have installed the flite-hts voices which sound infinitely better than the builtin festival voices(Although still with some very occasional clicks and pops).
      However when I attempt to play a wav file(Signed 16 bit Little Endian, Rate 44100 Hz, Stereo) I get nothing. Also when I attempt to use a speak device from the weather.xml plugin I get nothing. Using the windows speaker client all is operational.
      can you set the log level to Debug from the AirplaySpeak config page, and post the logs you get when you try to speak something through an Airplay speaker.

      Comment


        #4
        Am I calling the right procedure?

        I am using the "Play Audio File" Action. Is this correct? I have just checked the manual which seems to suggest I should use the "Speak Something" Action and specify a file. I do not have the option under Linux to "Specify a file".
        To be clear when I use the "Speak something" option with text it works fine.
        When I use the "Play audio file" option it does not seem to even trigger the Airplay plugin. Here are the only two events in the log file when I call the action. Airs peak debugging is enabled.

        Jun-11 10:13:37 AM
        Event Event Trigger "Test IRC Test Wave" Jun-11 10:13:37 AM Event Event Test IRC Test Wave triggered by the event page 'Run' button.
        Last edited by chimera; June 10, 2016, 08:57 PM.

        Comment


          #5
          Correction

          If I unfold the advanced options then the control is there. However when I try to speak the contents of a file it speaks the encoded information as text.(But still not to the airplay clients) If I uncheck this control it simply speaks the file name.
          Last edited by chimera; June 10, 2016, 08:56 PM.

          Comment


            #6
            Originally posted by chimera View Post
            I am using the "Play Audio File" Action. Is this correct? I have just checked the manual which seems to suggest I should use the "Speak Something" Action and specify a file. I do not have the option under Linux to "Specify a file".
            To be clear when I use the "Speak something" option with text it works fine.
            When I use the "Play audio file" option it does not seem to even trigger the Airplay plugin. Here are the only two events in the log file when I call the action. Airs peak debugging is enabled.

            Jun-11 10:13:37 AM
            Event Event Trigger "Test IRC Test Wave" Jun-11 10:13:37 AM Event Event Test IRC Test Wave triggered by the event page 'Run' button.
            Yes you are supposed to use the "Speak Something" action to play a file. It's not working because I had never tested this feature on Linux and the plug-in is only looking for windows file path.

            I will fix it, thank you for reporting.

            Comment


              #7
              Thanks spud I'll look forward to it


              Sent from my iPhone using Tapatalk

              Comment


                #8
                I fixed the problem in version 3.0.0.11 attached to first post of this thread. To play a file, you have to use a "Speak Something" action and provide the full path of the file (beginning with a /) like in the screenshot below:

                Click image for larger version

Name:	speakwavfile.png
Views:	1
Size:	16.7 KB
ID:	1185136

                Comment


                  #9
                  Thanks

                  Spud,
                  There have been a number of issues I've had that are not plugin related in regards to getting these speakers up and running with Homeseer. I'm hoping you can assist.

                  I have a pair of JBL SoundFly Airplay speakers.
                  Firstly the sound was cutting in and out which I isolated as bad WIFI reception. A purchase of a new Ubiquiti AP has sorted this out and sound from iTunes is now clear except for the very rare drop out. Overall I'm now happy with them as Airplay speakers.

                  In addition to this my Amazon Echo seemed to be chopping the JBL's off all of my AirPlay device's speakers list when it did a device scan. I have temporarily disabled the echo to take it out of the equation and this seems to have fixed this issue.

                  Now I am back to square one with Homeseer and trying to get audio from the system. When sending some text to the speakers I may get a fraction of a sentence if I'm lucky, mostly nothing at all. Now this is a little odd because I was getting speech much more reliably before I replaced my router. I can't think what may have changed with the system.
                  Is there anything you can think of. Here is a debug extract:
                  Jun-21 12:11:35 PM

                  DEBUG TEARDOWN rtsp://10.7.0.18/3277229742 RTSP/1.0 CSeq: 6 Session: 1 User-Agent: iTunes/7.6.2 ( Windows;N Client-Instance: 70A7615150ECB498
                  DEBUG TIMING EXCEPTIONinterrupted
                  DEBUG Server, AirTunes/103.2
                  DEBUG CSeq, 5
                  DEBUG RTP-Info, rtptime=231054
                  DEBUG FLUSH rtsp://10.7.0.18/3277229742 RTSP/1.0 CSeq: 5 Session: 1 RTP-Info: seq=2136;rtptime=231406 User-Agent: iTunes/7.6.2 ( Windows;N Client-Instance: 70A7615150ECB498
                  DEBUG 13 Speaker.OnCheckStatusTimerEvent() gets the lock
                  DEBUG 13 Speaker.OnCheckStatusTimerEvent()
                  DEBUG 27 Speaker.OnQueueEnd() gets the lock
                  DEBUG 27 Speaker.OnQueueEnd()
                  DEBUG 17 Speaker.OnCheckStatusTimerEvent() gets the lock
                  DEBUG 17 Speaker.OnCheckStatusTimerEvent()
                  DEBUG 13 Speaker.OnCheckStatusTimerEvent() gets the lock
                  DEBUG 13 Speaker.OnCheckStatusTimerEvent()
                  DEBUG 17 Speaker.OnCheckStatusTimerEvent() gets the lock
                  DEBUG 17 Speaker.OnCheckStatusTimerEvent()
                  DEBUG 13 Speaker.OnCheckStatusTimerEvent() gets the lock
                  DEBUG 13 Speaker.OnCheckStatusTimerEvent()
                  DEBUG 25 Speaker.AfterSend()
                  DEBUG 25 Speaker.SendSample() gets lock
                  DEBUG 25 Speaker.SendSample()
                  DEBUG 25 Speaker.BeforeSend()
                  DEBUG CSeq, 4
                  DEBUG Server, AirTunes/103.2
                  DEBUG SET_PARAMETER rtsp://10.7.0.18/3277229742 RTSP/1.0 CSeq: 4 Session: 1 Content-Type: text/parameters Content-Length: 20 User-Agent: iTunes/7.6.2 ( Windows;N Client-Instance: 70A7615150ECB498 volume: -12.000000
                  DEBUG Server, AirTunes/103.2
                  DEBUG CSeq, 3
                  DEBUG Audio-Latency, 4096
                  DEBUG RECORD rtsp://10.7.0.18/3277229742 RTSP/1.0 CSeq: 3 Session: 1 Range: npt=0- RTP-Info: seq=1554;rtptime=26542 User-Agent: iTunes/7.6.2 ( Windows;N Client-Instance: 70A7615150ECB498
                  DEBUG Session, 1
                  DEBUG Server, AirTunes/103.2
                  DEBUG CSeq, 2
                  DEBUG Audio-Jack-Status, connected; type=analog
                  DEBUG Transport, RTP/AVP/UDP;unicast;mode=record;server_port=1264;control_port=1265;t iming_port=1266
                  DEBUG SETUP rtsp://10.7.0.18/3277229742 RTSP/1.0 CSeq: 2 Transport: RTP/AVP/UDP;unicast;interleaved=0-1;mode=record;control_port=55462;timing_port=53557 User-Agent: iTunes/7.6.2 ( Windows;N Client-Instance: 70A7615150ECB498
                  DEBUG CSeq, 1
                  DEBUG Server, AirTunes/103.2
                  DEBUG ANNOUNCE rtsp://10.7.0.18/3277229742 RTSP/1.0 CSeq: 1 Content-Type: application/sdp Content-Length: 176 User-Agent: iTunes/7.6.2 ( Windows;N Client-Instance: 70A7615150ECB498 v=0 o=iTunes 3277229742 0 IN IP4 10.7.0.18 s=iTunes c=IN IP4 10.7.0.36 t=0 0 m=audio 0 RTP/AVP 96 a=rtpmap:96 AppleLossless a=fmtp:96 352 0 16 40 10 14 2 255 0 0 44100
                  DEBUG 25 Speaker.Reset() gets the lock
                  DEBUG 25 Speaker.Reset()
                  Jun-21 12:11:29 PM TTS Speak: ():Hello world This is a demonstration of the Festival speech synthesis system.
                  INFO (Kitchen SoundFly Air): Hello world This is a demonstration of the Festival speech synthesis system.

                  Comment


                    #10
                    Ok. It appears there are some compatibility problems with Airplay & Ubiquity. I fired up a windows vm to test if it was something to do with the Linux implementation but had the same almost instant drop outs on Windows. Now I read that lots of people are having problems with Ubuqiti and Airplay. Interestingly though the problems for me at least are not occurring with iTunes. I have re-setup my Apple Airport and the Airplay speak plugin is back to being it's old self. Man this is a minefield. I am going to send off some wireshark traces to Ubiquiti to see what they have to say.

                    Comment


                      #11
                      How to run the code on Linux device?

                      I tried to run the command:

                      sudo apt-get install avahi-daemon libavahi-cil-dev

                      from Tools>System>Linux tools, but it prompts for a Y/n answer.
                      How do I run this command?
                      And also, how do install the files from the zip on my Homeseer Zee S2?

                      Comment


                        #12
                        Originally posted by stevenseh@gmail.com View Post
                        I tried to run the command:

                        sudo apt-get install avahi-daemon libavahi-cil-dev

                        from Tools>System>Linux tools, but it prompts for a Y/n answer.
                        How do I run this command?
                        And also, how do install the files from the zip on my Homeseer Zee S2?
                        you need to "ssh" to your Zee S2 using a software like putty, see step 1 to 7 in this thread: http://board.homeseer.com/showthread.php?t=162297

                        Comment


                          #13
                          Errors received when running sudo apt-get install avahi-daemon libavahi-cil-dev

                          Thanks!
                          I can now logon OK to the Zee S2. However, when I run the command it issues tons of error messages.
                          Err http://mirrordirector.raspbian.org/raspbian/ wheezy/main libisc84 armhf 1:9.8.4.dfsg.P1-6+nmu2+deb7u4 404 Not found.
                          A few files were found, but the majority not. There are also Failed to fetch errors. It suggests running apt-get update or with --fix-missing

                          Help please!

                          Comment


                            #14
                            Originally posted by stevenseh@gmail.com View Post
                            Thanks!
                            I can now logon OK to the Zee S2. However, when I run the command it issues tons of error messages.
                            Err http://mirrordirector.raspbian.org/raspbian/ wheezy/main libisc84 armhf 1:9.8.4.dfsg.P1-6+nmu2+deb7u4 404 Not found.
                            A few files were found, but the majority not. There are also Failed to fetch errors. It suggests running apt-get update or with --fix-missing

                            Help please!
                            try

                            Code:
                            sudo apt-get update

                            Comment


                              #15
                              OK, that worked. Thanks!
                              I'm now at the installation step.
                              How do I copy the zip you attached to the Zee S2?

                              I tried pscp, but I'm getting an error message:

                              Permission denied.
                              Error code: 3
                              Error message from server: Permission denied

                              I suppose the target directory is /usr/local/HomeSeer/Updates3/Zips
                              Last edited by stevenseh@gmail.com; June 25, 2016, 04:45 PM. Reason: Additional info

                              Comment

                              Working...
                              X