Loading ...
Sorry, an error occurred while loading the content.

47347Re: [mh] Sending audio to a Logitech Squeezebox from Misterhouse

Expand Messages
  • Lieven Hollevoet
    Aug 13, 2014
    • 0 Attachment
      Hey Brian,

      thanks for testing this out. I was generating the xpl messages using xpl-sender from the xpl-perl framework (with correct class and escaped path) however I forgot to add the quotes in the command so the 'playlist play’ did not make it into the message. My bad. The following does indeed work fine:

      xpl-sender -m xpl-cmnd -c audio.slimserv -t slimdev-slimserv.wekker extended="playlist play %2FVolumes%2FMedia%2Fspeech%2Ftest.wave”


      Kind regards,
      Lieven.


      Op 13-aug.-2014, om 08:40 heeft Brian Rudy <brudy@...> het volgende geschreven:

      > Just a quick update: I did end up getting 'playlist play' to work, but had to escape the file path. The schema specs do reference escaping, but weren't too clear the form of escaping needed. Looking at the plugin's xPL.pm, the 'playfile' command just does the following:
      >
      > # PLAYFILE
      > elsif ($xplcmd eq "playfile") {
      > $params = Slim::Web::HTTP::escape($params);
      > xplExecuteCmd("playlist play $params",$clientid);
      > }
      >
      >
      > So I just URL encoded the same file path as in the previous test and did the following from my user code:
      >
      > $sb_acheron->send_cmnd('audio.slimserv' => {'extended' => 'playlist play %2Fmediashare%2Fmusic%2FBlank%20%26%20Jones%2FRelax%20Edition%204%2F05%20Chilled%20Cream.mp3'});
      >
      > I also got the Google TTS example working (sort of) with:
      >
      > $sb_acheron->send_cmnd('audio.slimserv' => {'extended' => 'playlist play http%3A%2F%2Ftranslate.google.com%2Ftranslate_tts%3Ftl%3Den%26q%3DJust%2Ba%2Btest'});
      >
      > LMS seems to be unable to detect the end of the TTS stream and seems to think it is still playing after the clip has ended. This will require some investigation, but is likely due to the way Google is encoding the mp3 of the response.
      >
      >
      > On 08/12/2014 02:30 PM, Brian Rudy wrote:
      >> Thanks Lieven,
      >>
      >> wrt TTS, I have done something similar using Festival with MH to play locally and send a copy of the TTS audio output to the audio output on a two-way audio webcam. From my mh.private.ini:
      >>
      >> # Also send to the Airlink101 cam audio
      >> festival_init_cmds=(Parameter.set 'Audio_Method 'Audio_Command)
      >> (Parameter.set 'Audio_Required_Rate 22000)
      >> (Parameter.set 'Audio_Required_Format 'wav)
      >> (Parameter.set 'Audio_Command "sox $FILE -r 44100 $$.wav; sox $$.wav -c 1 -r 8192 -2 -t raw $$-echo.raw; aplay -c 1 -f S16_LE -r 8192 --nonblock $$-echo.raw; /usr/local/bin/fitivision-audio-push.pl --camip 192.168.1.22 --username admin --password password --upfile $$-echo.raw; rm $$.wav; rm $$-echo.raw")
      >>
      >> As for extended commands like 'playlist play' with xPL, I assume you used AUDIO.SLIMSERV rather than AUDIO.BASIC? I tried 'playfile' per the following from my user code and it seemed to work:
      >>
      >> $sb_acheron->send_cmnd('audio.slimserv' => {'extended' => 'playfile /mediashare/music/Blank & Jones/Relax Edition 4/05 Chilled Cream.mp3'});
      >>
      >> I'll try TTS playback when I get some more time to play.
      >>
      >> The xPL message schema specifics (e.g. http://www.xplproject.org.uk/wiki/index.php/Schema_-_AUDIO.SLIMSERV) are not that good, but should have enough for us to figure it out as long as LMS' xPL support isn't totally broken somewhere thus far undetected. I am not that familiar with xPL, but IMHO the basic tenets (message subscription, state synchronization, etc) would seem to be a better fit for MH integration than the telnet CLI if we can get it to work. Since I still want to use off-the-shelf clients for LMS like Orange Squeeze for Android or workalikes, keeping MH synchronized with externally induced state changes will be important.
      >>
      >>
      >> Thanks again!
      >> -Brian
      >>
      >>
      >> On 08/12/2014 12:50 PM, Lieven Hollevoet wrote:
      >>> Hey Brian,
      >>>
      >>> I’m still using the xPL interface to my Squeezeboxen so that I am able to control the power switch of the amplifiers that are connected to them. This works fine.
      >>>
      >>> You question triggered me again to look into adding support for playing generated files on the squeezeboxes. I have currently working:
      >>> * generating TTS data to a wave file (I’m using OS X so TTS in built-in)
      >>> * playing the generated TTS wave file through the CLI interface of Squeezebox server (using telnet, not from MisterHouse). This step is important as it was not clear to me if you could play auto-generated files that are not indexed by the Squeezebox server application. It appears you can do this, so this is good news.
      >>>
      >>> What is not working yet:
      >>> * using an updated version of the xPL_Squeezebox module to play the TTS file through an xPL command.
      >>>
      >>> This is strange, as according to the xPL docs the xPL interface of the Squeezebox server is merely a different interface to the CLI interface of the server, so sending commands through xPL should work (and do work for simple commands like ‘pause’ and ’next’, but not for the more complex commands like ‘playlist play').
      >>>
      >>> It is currently not clear to me if I should proceed trying to get the xPL interface up and running. Maybe migrating to the CLI will in the end provide a more stable solution. This is also the route the Micasaverde solution follows.
      >>> I found this code on a forum that might help us further:
      >>>
      >>> http://knx-user-forum.de/knx-eib-forum/4717-misterhouse-und-squeezebox-2.html
      >>>
      >>> I still need to examine this further to see if this is what we need.
      >>>
      >>> Best regards,
      >>> Lieven.
      >>>
      >>>
      >>> Op 12-aug.-2014, om 09:37 heeft Brian Rudy
      >>> <brudy@...>
      >>> het volgende geschreven:
      >>>
      >>>
      >>>> Hi folks,
      >>>>
      >>>> Sorry in advance for replying to this old thread, but it seems to have ended abruptly and I am facing a similar set of questions.
      >>>>
      >>>> I have recently started researching Linux-based whole-house audio/music solutions and played a bit with the existing music modules and wanted to share my opinion/findings and solicit your advice.
      >>>>
      >>>> Music modules from code/common:
      >>>> mp3.pl
      >>>> -requires local (or network-attached) music library. No direct support for external streaming services like Pandora/Spotify/Last.fm
      >>>>
      >>>> mp3_xmms.pl
      >>>> -XMMS no longer appears to be in active development and is difficult to compile/run on modern distros.
      >>>>
      >>>> mp3_mpd.pl
      >>>> -I got stuck in Perl module dependency hell trying to satisfy the dependencies of Audio::MPD and never did manage to get it to install properly.
      >>>>
      >>>> mp3_alsaplayer.pl
      >>>> -I eventually got AlsaPlayer and the Perl module installed, but the player and Perl module seem to have some type of incompatibility as when I invoked playback through MH, AlsaPlayer kept looping the first few seconds of the music over and over again regardless of what I did.
      >>>>
      >>>> mp3_slimserver.pl
      >>>> -I did quite a bit of research here as SlimServer->SqueezeCenter->Squeezebox Server and finally Logitech Media Server that thanks the open source code seems to have quite a bit of community participation and 3rd party development (including new 3rd party LMS-compatible hardware) even though Logitech is no longer selling/supporting Squeezeboxes themselves. I installed LMS 7.9.0 on my MH server and fairly quickly had things up and running with squeezelite on Linux and Squeeze Player for my Android devices. I then attempted to enable mp3_slimserver.pl, but the lack of support for /status.txt (this is likely a bug in LMS 7.9.0) made the module unusable. I then started digging around and found this thread. After a little more fiddling I was able to get my LMS instance and players to register with the xPL module Lieven provided and minimally control them and read their state. I haven't done anything with device synchronization just yet, but am sure there is a way. There is the issue
      >>>> o
      >>>>
      >>>> f music library synchronization between MH and LMS, but it looks like there are many options.
      >>>>
      >>>> Now for the question of playing TTS output; It looks like someone found a few ways to do it over on the micasaverde forums and added some hints on their wiki:
      >>>> http://wiki.micasaverde.com/index.php/Squeezebox#Using_Google.27s_TTS_engine_for_announcements
      >>>> I'm sure we could so something similar for the other speech synthesis engines as well. To do this properly we would need to first capture the current playlist+playback position and restore these after the TTS playback had ended as Lieven had mentioned.
      >>>>
      >>>> Is anyone else using some combination of LMS/Squeezeboxes/squeezelite/raspberry pi/opensqueeze/etc or some other combination of kit with their whole-house audio system and would be willing to provide some input? Ultimately what I am looking to do is have a centrally managed multi-room music/audio system with IP-connected players that is integrated with MH.
      >>>>
      >>>> TIA!
      >>>> -Brian
      >>>>
      >>>>
      >>>
      >>>
      >>> ------------------------------------------------------------------------------
      >>>
      >>>
      >>>
      >>> ________________________________________________________
      >>> To unsubscribe from this list, go to:
      >>> https://lists.sourceforge.net/lists/listinfo/misterhouse-users
      >>>
      >>>
      >>>
      >>
      >>
      >>
      >> ------------------------------------------------------------------------------
      >>
      >>
      >>
      >> ________________________________________________________
      >> To unsubscribe from this list, go to:
      >> https://lists.sourceforge.net/lists/listinfo/misterhouse-users
      >>
      >>
      >>
      >
      > ------------------------------------------------------------------------------
      > ________________________________________________________
      > To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
      >
    • Show all 56 messages in this topic