www.homeseer.com    
 

Go Back   HomeSeer Message Board > Media Plug-ins > Media Discussion > SqueezeBox Plug-In (3P)

SqueezeBox Plug-In (3P) Discussion area for the SqueezeBox plug-in by PCP.

Reply
 
Thread Tools Display Modes
  #1  
Old March 14th, 2010, 04:07 PM
pcp pcp is offline
Super Seer
 
Join Date: Jan 2006
Location: MA
Posts: 1,690
SqueezeBox plugin V2.0.0 beta 2

Attached is version 2.0.0 beta 2 of the SqueezeBox plug-in. Compared to previous 2.0.0 Beta version this version includes a few major enhancements
  • Caching of Genres, Artists and Albums library information
  • HS-Touch integration witch fixes for several issues
  • Speech Proxy support enabling to route HS2 speech to SqueezeBox players
  • SqueezeBox player alarm integration
  • Actions to synchronize/un-synchronize players
The Speech proxy supports two approaches to integrate the squeezebox players as speech clients. One uses the SqueezeBox WaveInput plug-in to stream the output of one of your HS2 Speaker client to the players and another uses a plug-in built-in TTS engine to generate wav files that will be played on the speaker. Since the plug-in is not a real speaker client, the second choice might provide less delays, but might not be 100% follow the speaker client protocols (and all speech proxy rules that you might have). The first approach requires installation of the SqueezeBox WaveInput plug-in, though I experienced delays when streaming HS2 speaker clients through it. All this is fairly new code and feedback will be welcome.

INSTALLATION NOTES – PLEASE READ
Since I added three devices per player, the devices per player have changed. In order to accommodate for many players, I also revised the first few HS2 plug-in devices, reducing the count. This will allow accommodating for up to 12 players.

Before installing this plug-in, disconnect your current plug-in from the SqueezeBox server (button on status page), and delete all SqueezeBox related devices (you could leave the first one if desired but non of the others. Also edit the plug-in ini file (config/hspi_squeezebox.ini) and remove all player references. Each player section starts with the id of the player for example “[00:04:22:12:9c:f8]”. They are found typically at the end of the ini file. Failing to remove the HS2 devices and player references in the INI file will lead to HS2 device name / value confusing. This is a one time task, not the most elegant, though any automatic migration was not working as well as I hoped (and at the end decided to spend more time on the plug-in instead of migration logic).

This is Beta software, backup before installing the attached beta update! This Beta software should be installed on top of the currently released plug-in available from the updater. Once installed, do not forget to update the SqueezeBox Server plug-in using the Extension Downloader.

Beta Updates:
Uploaded a new revision 2.0.0.7 that corrects returning the Album length using the Music APIs/HSTouch.

Uploaded a new revision 2.0.0.8:
  • Revised the logic of the speak proxy. You should experience fewer delays on speaker clients as text is spoken. Note that this pug-in does not do any fancy handling as other speak proxy plug-ins do
  • Fixed an issue to correctly disables the proxy registration when disabled in the plug-in. This will avoid the double speak some experienced.
  • Easier integration with other speech proxy plug-ins. Added two APIs that will let you enable and disable SqueezeBox players as your proxy server of choice indicates that zones should be turned on or off. As before it only enables SqueezeBox players for which the speak volume HS2 device has been set to a positive value (i.e. not 0). The APIs are
    Public Sub EnableSpeaking()
    Public Sub DisableSpeaking()
  • New API to speak text using the built in TTS. It returns the duration of the track. It assumes you call EnableSpeaking() prior to calling this API and will either use the built in TTS or call hs.peak in case you use the wavein approach to integrate a speaker client with the squeezebox plug-in
    Public Function Speak(ByVal text As String) As Double
  • Changed the default album images from png to jpg as they use less resources
Uploaded a new revision 2.0.0.9:
  • Fixed issue displaying SB plugin artwork (From Sounds & Effects, Pandora plug-ins)
  • Fixed issue with Music API PlayIfPaused.
  • Added configuration option (see Plug-in Configuration page) to include or not built-in menus in player menus (Devices, Events, Phone Messages, CID and Misc).
Uploaded a new revision 2.0.0.10:
  • Fixed issue synchronizing all players when calling hspi.BroadcastActionByName("synchronize player", "aPlayerName")
Uploaded a new revision 2.0.0.11:
  • Added new scripting APIs to query the server: PlayerQueryCLICommand and ServerQueryCLICommand. Please refer to the documentation for the exact signatures.
Uploaded a new revision 2.0.0.12:
  • Removed the "No Status Trigger" hs2 device option for the players "title" devices,

NOTE: The release version (V2.0.1.0) of this beta is available via the Updater.

Last edited by pcp; December 22nd, 2010 at 08:51 PM. Reason: Updated plug-in version
Reply With Quote
  #2  
Old March 16th, 2010, 07:59 PM
heatvent's Avatar
heatvent heatvent is offline
Seer Master
 
Join Date: Nov 2007
Location: Chicago
Posts: 1,144
I am trying your plugin. The announcements don't seem to play correctly on my SB boom. I get an error on the SB that the file speakin has bad headers. Now Squeezebox Server is on a separate PC and the speakin file error is referring to my HS PC. Is that the problem? Do I need a squeezebox server directory on the HS PC? If so, where?

OK, it worked once when I shutdown HS (I have HS say that it is shutting down over the clients). I tried a second time and did not work. I tried uninstalling SB Server and reinstalling. Still no luck. I also noticed the follwing error in the HS log after checking use HS log in the settings:

3/16/2010 9:25:25 PM ~!~Error~!~Error processing plug-in links for /SqueezeBox/SpeakIn.wav requested by from 192.168.0.100, at:110, Index was outside the bounds of the array.
3/16/2010 9:25:25 PM ~!~Error~!~Error processing plug-in links for /SqueezeBox/SpeakIn.wav requested by from 192.168.0.100, at:110, Index was outside the bounds of the array.

Last edited by heatvent; March 16th, 2010 at 10:28 PM.
Reply With Quote
  #3  
Old March 18th, 2010, 11:24 PM
heatvent's Avatar
heatvent heatvent is offline
Seer Master
 
Join Date: Nov 2007
Location: Chicago
Posts: 1,144
Bump
Reply With Quote
  #4  
Old March 19th, 2010, 08:12 PM
pcp pcp is offline
Super Seer
 
Join Date: Jan 2006
Location: MA
Posts: 1,690
If you use the built in TTS rather than streaming a Speaker client to SB via the WaveIn plug-in, the Squeezebox plug-in will create a sound file with the text to speak. The file will be located in {HS2 installation directory}\html\SqueezeBox\SpeakIn.wav.

1) I assumed you configured the plug-in to not use the waveIn on the plug-in configuration page.
2) Also ensure that you set the Speak Volume HS2 device (Device is 'Player 2 Speak Volume') for at least one of the players to a value greater than 0. If set to 0 it is not enabled for that player.
3) Check first that this file exists and you can listen to it on that PC with any media player.
4) Next try to use a browser (on the HS2 server or a different server) and enter http:{hs2-server}:{hs2-http-port}/SqueezeBox/SpeakIn.wav which should download the file and offer to play it with a media player.
5) If 4) works, try to enter the same URL in the SB Server web page for one of the players as a direct 'Tun in URL' (you can find it in the web page by navigating to Home > Internet Radio > Tune In URL.
Reply With Quote
  #5  
Old March 22nd, 2010, 09:03 AM
markus.bergvoll markus.bergvoll is offline
Seer Deluxe
 
Join Date: Oct 2008
Location: Norway
Posts: 305
Hi,
again thanks for an nice update. I haven't tested it much yet, but i did encounter a problem. When i try to go to the config page i get nothing (except the HS menu on top) and in the HS log i get this error message:
22.03.2010 13:56:12 - Error - Calling GenPage for plugin, link: /squeezebox?pg=config Error: Exception from HRESULT: 0x80045039.

After some google searching it seems like its related to SAPI and TTS.

Seen this before?

Thanks
__________________
Markus
Home Automation Beginner
Reply With Quote
  #6  
Old March 22nd, 2010, 06:41 PM
pcp pcp is offline
Super Seer
 
Join Date: Jan 2006
Location: MA
Posts: 1,690
No I have not seen this. Even though use by HS2's voice recognition, have you by any chance not installed the Microsoft Speech Recognizer Engine?
Reply With Quote
  #7  
Old March 22nd, 2010, 07:07 PM
markus.bergvoll markus.bergvoll is offline
Seer Deluxe
 
Join Date: Oct 2008
Location: Norway
Posts: 305
Quote:
Originally Posted by pcp View Post
No I have not seen this. Even though use by HS2's voice recognition, have you by any chance not installed the Microsoft Speech Recognizer Engine?
I dont think so. But here are some screen shots from speech control panel in Xp where HS is installed. I do NOT have speaker or microphone connected.

I have norwegian regional settings on XP.
I did also notice that My duet controller did not parse the xml file for HS control. Might it be connected?

I remember having that before, but i can not find duplicate names or scandinavian letters in the device names.
Attached Images
  
Reply With Quote
  #8  
Old March 24th, 2010, 09:51 PM
pcp pcp is offline
Super Seer
 
Join Date: Jan 2006
Location: MA
Posts: 1,690
I will have to look into this and don't believe the two are related. For the menus on the Duet, have you checked the log file? With the newer versions, even if you have duplicate events or device names per category it should resolve it automatically. Could you email me the log file (with debugging enabled) for both cases? Thanks
Reply With Quote
  #9  
Old March 27th, 2010, 09:56 AM
pcp pcp is offline
Super Seer
 
Join Date: Jan 2006
Location: MA
Posts: 1,690
Markus, I updated the plug-in version; it should resolve the issue you encountered (or at least better catch errors and log them).
Reply With Quote
  #10  
Old March 28th, 2010, 11:24 AM
w.vuyk's Avatar
w.vuyk w.vuyk is offline
OverSeer
 
Join Date: Jul 2005
Location: The Netherlands
Posts: 2,871
pcp,

I am trying your plugin and like what I am seeing. I am now on beta 6.
I am seeing a few errands wich I will list here.

I have three players running, one slimdevice en two squeezebox slaves.
I have the slimdevice setup in HSTouch for control. The other players are set to synchronize.
When I disconnect or switch off one player (not the slimdevice wich is in HSTouch) HSTouch is not anymore updating the image or title/album/artist of the current playing song. After a restart of HS (I guess the plugin) updates take place again until one of the players is changing on/off/disconnect.

A second issue is with the speakerclient. I have tried without Wavein. The result is a speech on the players wich is way to fast in speech to understand it, I did try to set the rate lower, but at -10 it is still to fast to understand a word of it. As unwanted extra, windows speaker client PC's start windows media player and play the speech in Windows media player(and at correct rate) This is not wantend behaviour.

After that I tried usinng wavein. The result is that players show "Wavein:0" and nothing happens anymore. The music does not play anymore until I choose "Next".

A third issue is also with the speaker clientis. Whenever speaker clients are speaking (thus also aimed for other clients then Squeezeclients) the music pauses and very often does not unpause after speech is done, wich makes it very unreliable to work with.

I just started playing with your plugin, so maybe above issues come from errors from my side. In that case I hope you can help me on the way, otherwise I hope you correct the issues mentioned here.

I like what I am seeing, I guess I will be a soon to be solid user of your plugin

Wim
__________________
-- Wim

Plugins:RFXCOM, HSTouch Server, Squeezebox, BLGData, Restart, Jon00's Perfmon and Network monitor, WeatherXML, BLBackup, TenScripting, BC4, Pushover, PHLocation, JowiHue, Zwave, Sonos
650 devices ---- 336 events ----- 40 scripts
Reply With Quote
  #11  
Old March 29th, 2010, 10:07 AM
markus.bergvoll markus.bergvoll is offline
Seer Deluxe
 
Join Date: Oct 2008
Location: Norway
Posts: 305
Quote:
Originally Posted by pcp View Post
Markus, I updated the plug-in version; it should resolve the issue you encountered (or at least better catch errors and log them).
Thanks The page now displays fine. But I get this error message in the log when i load it.

29.03.2010 16:04:58 - SqueezeBox Error - An unexpected error occured in the GetVoices function/subroutine: [System.Runtime.InteropServices.COMException (0x80045039): Exception from HRESULT: 0x80045039 at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(O bject o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack) at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGe t(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack) at HSPI_SQUEEZEBOX.HSPI.GetVoices()]
Reply With Quote
  #12  
Old March 29th, 2010, 11:52 AM
w.vuyk's Avatar
w.vuyk w.vuyk is offline
OverSeer
 
Join Date: Jul 2005
Location: The Netherlands
Posts: 2,871
Error after startup

pcp,

Tonight, while starting HS I got the folowing error in the log:
Code:
Device: Systeem Squeezebox Status ($1) Value set to 1
29-3-2010 17:46:47 Event Deleting event after run: "Delayed Actions Status (delayed action)"
29-3-2010 17:46:47 Event Event Trigger "Status (delayed action)-1"
29-3-2010 17:46:47 Device Control Device: Systeem Squeezebox Status ($1) Value set to 1
29-3-2010 17:46:47 Event Deleting event after run: "Delayed Actions Status (delayed action)-1"
29-3-2010 17:46:47 SqueezeBox Info Connected to SqueezeCenter
29-3-2010 17:46:47 SqueezeBox Info SqueezeCenter Player Count: 3
29-3-2010 17:46:47 SqueezeBox Info Disconnected from SqueezeCenter
29-3-2010 17:46:47 SqueezeBox Info Connected to SqueezeCenter
29-3-2010 17:46:47 SqueezeBox Info SqueezeCenter Player Count: 3
29-3-2010 17:46:47 SqueezeBox Error An unexpected error occured in the tcpClient_onLineArrival function/subroutine: [System.NullReferenceException: De objectverwijzing is niet op een exemplaar van een object ingesteld. bij HSPI_SQUEEZEBOX.hspi_player.GetCurrentPlaylistIndex() bij HSPI_SQUEEZEBOX.hspi_player.UpdatePlayerDevices() bij HSPI_SQUEEZEBOX.hspi_player.CreatePlayerDevices() bij HSPI_SQUEEZEBOX.HSPI.getOrCreatePlayer(Int32 index, String ID) bij HSPI_SQUEEZEBOX.HSPI.tcpClient_onLineArrival(String str)]
I hope this will help to catch this bug?

Wim
Reply With Quote
  #13  
Old March 29th, 2010, 04:19 PM
w.vuyk's Avatar
w.vuyk w.vuyk is offline
OverSeer
 
Join Date: Jul 2005
Location: The Netherlands
Posts: 2,871
pcp,

I tried to use the musicapi today and found an error that might relate to HSTouch not responding after a while.
If I run the following script nothings seems to happen. But if one of the players is playing already, the device will stop playing at all. At the same time HSTouch is not responding as I told you in the earlier messages. The script part is working in the media Player plugin of HS. Also pressing the play buttons in the HS HTML interface does not do anything anymore. As if the plugin comes in a error state, but not showing it in the log.

The scriptsample:

Function Main(ByVal parms AsObject) AsBoolean

Dim MediaPlayer AsObject = hs.Plugin("Squeezebox").GetMusicAPI(1)
MediaPlayer.PlayMusic(
"", "", "Joy")

EndFunction

This is just the first statement I was testing.

This ends with non responsive plugin

Maybe you are wondering why I am not using the script commands outsike the MusicApi, this is because I have a plugin for my wake up needs. This plugin is using Media player already, but I want to add another room to wake up with squeezebox. For consistency I want to use the MusicAPI, because that is a lot easier to use.

Wim
Reply With Quote
  #14  
Old March 29th, 2010, 11:31 PM
pcp pcp is offline
Super Seer
 
Join Date: Jan 2006
Location: MA
Posts: 1,690
Wim,

Do you have playlist called Joy and does the API call return? Have you tried by instead specifying an Artist or Genre? HSTouch will use the same call when playing music.

To use the wave:in plug-in ensure all is configured fine. If you play music on the PC/soundcard that voice should be streamed to the SqueezeServer. You can try all this independently of the HS2 plugin. It took me some trial as well to get the mixer and streaming work fine. If you the built-in TTS, does changing the rate make any difference? Works fine here, though will I will try to see if I can reproduce it.
Reply With Quote
  #15  
Old March 29th, 2010, 11:45 PM
pcp pcp is offline
Super Seer
 
Join Date: Jan 2006
Location: MA
Posts: 1,690
This error was trapped by the plug-in, which is the SAPI error SPERR_NO_MORE_ITEMS. Have you configured your speech/sapi interface?

Quote:
Originally Posted by markus.bergvoll View Post
Thanks The page now displays fine. But I get this error message in the log when i load it.

29.03.2010 16:04:58 - SqueezeBox Error - An unexpected error occured in the GetVoices function/subroutine: [System.Runtime.InteropServices.COMException (0x80045039): Exception from HRESULT: 0x80045039 at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(O bject o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack) at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGe t(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack) at HSPI_SQUEEZEBOX.HSPI.GetVoices()]
Reply With Quote
  #16  
Old March 30th, 2010, 01:54 AM
w.vuyk's Avatar
w.vuyk w.vuyk is offline
OverSeer
 
Join Date: Jul 2005
Location: The Netherlands
Posts: 2,871
Quote:
Originally Posted by pcp View Post
Wim,

Do you have playlist called Joy and does the API call return? Have you tried by instead specifying an Artist or Genre? HSTouch will use the same call when playing music.

To use the wave:in plug-in ensure all is configured fine. If you play music on the PC/soundcard that voice should be streamed to the SqueezeServer. You can try all this independently of the HS2 plugin. It took me some trial as well to get the mixer and streaming work fine. If you the built-in TTS, does changing the rate make any difference? Works fine here, though will I will try to see if I can reproduce it.
pcp,

It is a playlist Joy and plays well when I use the Squeezebox server. The script ends with no error. But when I run this, music stops on the squeezeboxes. I will try with artists or genres tonight.

For the wavein I have installed the wavein plugin in the squeezebox server. Enabled speech in your plugins configuration and named the speakerclient "Squeezer". I addressed speech to (HSServer):Squeezer. Should I configure anything else?

If I use it this way the phisical squeezebox shows a http address on the display and ends with showing "wavein" on the display. And this stays until I press play on the squeezebox server or remote.

If I use the TTS on the machine it works fine, rate and pitch are working as expected. When I choose not to use wavein in your plugin and address the Squeezer client, speech words are played on the squeezebox but way to fast. Changing the rate does not help. Where the normal speaker client is working perfect on the same HS server.

Wim

Last edited by w.vuyk; March 30th, 2010 at 01:09 PM.
Reply With Quote
  #17  
Old March 30th, 2010, 01:17 PM
w.vuyk's Avatar
w.vuyk w.vuyk is offline
OverSeer
 
Join Date: Jul 2005
Location: The Netherlands
Posts: 2,871
pcp,

Just finished testing the script with artist and genres. Both worked right. Tested the playlist again, no joy playing the joylist...
Then I generated a new playlist because all other playlists I use were autmated playlists for WMP.
This one would just play with the script! So i checked the Joy playlist. The first "song" in this playlist was a 5 second silence wave... I added this silence a long time ago, because WMP - although set to shuffle -would always start with the same song when started.
As it seems now the Squeezebox or server does not like this and stops because of it.

I removed this song, and so far both HSTouch, the script and my old wakeup plugin are performing stable. I guess this one is solved then.

Only issue left is the speaker client now.

Thanks,

Wim
Reply With Quote
  #18  
Old March 31st, 2010, 01:06 AM
pcp pcp is offline
Super Seer
 
Join Date: Jan 2006
Location: MA
Posts: 1,690
Good to hear that you solved one of the problem.

Quote:
Originally Posted by w.vuyk View Post
For the wavein I have installed the wavein plugin in the squeezebox server. Enabled speech in your plugins configuration and named the speakerclient "Squeezer". I addressed speech to (HSServer):Squeezer. Should I configure anything else?
For the wavein plugin, when I configured it I initially did not use the HS2 speakers. I used the media player to play songs on the sound card and adjusted the sound card mixer configuration and wavein url on the SB side until I could hear the songs played by the media player streamed through the SB player. Check http://wiki.slimdevices.com/index.php/WaveInput_plugin as it contains details about wavein. Once I had this configured, I only used it to stream HS2 speaker clients to it.

Regarding the built in TTS, can you listen the generated SpeekIn wav file (in /html/SqueezeBox) using the MS media player? I want to ensure that playing it is not a issue specific SB Server/Player.
Reply With Quote
  #19  
Old March 31st, 2010, 10:18 AM
w.vuyk's Avatar
w.vuyk w.vuyk is offline
OverSeer
 
Join Date: Jul 2005
Location: The Netherlands
Posts: 2,871
Quote:
Originally Posted by pcp View Post
Check http://wiki.slimdevices.com/index.php/WaveInput_plugin as it contains details about wavein. Once I had this configured, I only used it to stream HS2 speaker clients to it.
I have checked this link and I am afraid I have found an answer. This plugin won't work on my soundcard as it is not showing a "Stereo Mixer". I am running on Windows 7 with two sound cards in it. The default soundcard (Creative SB X Fi) does not have such an entry, wich means it will not work. This might also explain why the unpause was not working properly? Looks like the wavein is not an option then.

Quote:
Originally Posted by pcp View Post
Regarding the built in TTS, can you listen the generated SpeekIn wav file (in /html/SqueezeBox) using the MS media player? I want to ensure that playing it is not a issue specific SB Server/Player.
I have found the file and played it om my system. It is playing properly in de media player. Still the squeezebox is speeding the speech, same as both Squeezeslaves on my HS server, which is the same machine generating the file.

I am running version 7.4.2/30215 of the Squeezebox server.

Wim
Reply With Quote
  #20  
Old March 31st, 2010, 09:44 PM
pcp pcp is offline
Super Seer
 
Join Date: Jan 2006
Location: MA
Posts: 1,690
Quote:
Originally Posted by w.vuyk View Post
I have found the file and played it om my system. It is playing properly in de media player. Still the squeezebox is speeding the speech, same as both Squeezeslaves on my HS server, which is the same machine generating the file.
Maybe this one has something to do with the how SB Server/players are configured to play wav files. Check if this file type enabled on your system and which decoder it is using. Have you ever player a wav file? Could you try it with any other music or sound wav file to ensure it is configured correctly?
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 11:22 AM.


Copyright HomeSeer Technologies, LLC