getmusicbee.com

MusicBee & Add-Ons => Customizations => Plugins => Topic started by: BoringName on January 13, 2025, 12:34:00 AM

Title: VerBeeliser Track Information Announcer Plugin
Post by: BoringName on January 13, 2025, 12:34:00 AM
Latest version is available here Link. (https://getmusicbee.com/addons/plugins/529/verbeeliser/)

Minimum version required - 3.6.9143 P

It will not work on previous versions.

Does not work with WASAPI Exclusive mode.

This plugin allows you to configure any Metadata tag to be announced before or after a track plays using any installed voice in windows.

To open the settings go to Hamburger Menu->Edit Preferences->Plugins->verbeeliser->Configure

(https://i.imgur.com/J6sNTZl.png)

Any tag in the list on the left can be dragged to the right hand list. These can be dragged around to whatever order you want. You have to click on the actual text in the right hand list not just the line its in to drag them around.

To remove an item from the right hand list just drag it outside box. You will lose any Prefix/suffix/No Value you had set for that item. Note: it will be deleted as soon as you drag it outside the box, it doesn't wait for you to release the mouse button. It won't let you remove the last item.

The voice dropdown is populated by the installed voices in windows. You can add more voices by going to the following section in Windows - Settings->Time & Language->Speech->Manage Voices

End of Track specifies if the announcement happens at the end of the track

Volume Offset - The announcement uses the current volume setting in Musicbee. This value will increase the volume used for the announcement by the specified amount

Double clicking an item in the right hand list will open another form (again you have to double click the text,  not just the line it's in).
(https://i.imgur.com/OnDocCW.png)

Prefix - This will be spoken before the tag value
Suffix - This will be spoken after the tag value
No Value - This will be spoken if the tag value is empty.

In the example you can see I have it setup the Rating Tag. If the track playing has a 2.5 star rating it will say "Rating 2.5 stars". If the rating is empty it will say "Rating Zero Stars"

if all these settings are left blank it would just say "2.5" or nothing at all if it's empty.

If you want to add a small delay just add 3 full stops "..."

If the Prefix was set to "Rating...", when the announcement happens there will be a small pause between it saying "Rating" and "2.5". I've used quotes here to stipulate the values, you don't need to use quotation marks when entering the values.

I haven't done extensive testing so your mileage may vary....

edit: I new I would forget something.... You can also setup a hot key so it will announce the current playing song.
Hamburger Menu->Edit Preferences->Hotkeys->VerBeeliser Playing Track.

When the hot key is pressed it will pause the song, announce the information and then resume playing it.
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: aktor on January 13, 2025, 12:22:45 PM
It works only if end of the track is enabled. Plus there is a scaling problem as voice selector is hidden behind tags rolldown field.
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: BoringName on January 13, 2025, 12:46:36 PM
It works only if end of the track is enabled. Plus there is a scaling problem as voice selector is hidden behind tags rolldown field.

Can you please confirm you are using version 3.6.9143 and what font you have set in Musicbee. I have the forms set to a fixed font size so they shouldn't be scaling.

Can you confirm if "end of track" unticked doesn't work in the following scenarios.
- Nothing playing in musicbee and right clicking a track and selecting Play Now.
- letting a song play through until it switches to another track.

Note - if the tags you have selected are empty on the track you are playing, nothing will be spoken unless you have configured the prefix, suffix etc...

edit: I forgot an important bit of info. This will not work with WASAPI Exclusive mode.
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: aktor on January 13, 2025, 01:04:56 PM
I updated MB and now it works. I had  3.6.9133 version. Voice selector still hidden. OK and cancel partly visible.
An option for only hotkey functionality. Every song is too much.
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: BoringName on January 13, 2025, 01:14:43 PM
I updated MB and now it works. I had  3.6.9133 version.

Do you have any suggestions on how I could have made the version requirement any clearer? It's literally the first thing under the download link listed in bold.....

Voice selector still hidden. OK and cancel partly visible.

You didn't list what font you are using.

An option for only hotkey functionality. Every song is too much.

I'll put an disable option into the next version.
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: aktor on January 13, 2025, 01:38:32 PM
SegoeUI 9.75 pt
An option that would allow voice speaking over the song audio. Now it wait till the announcement is over.
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: BoringName on January 13, 2025, 09:59:40 PM
SegoeUI 9.75 pt
An option that would allow voice speaking over the song audio. Now it wait till the announcement is over.

I can't reproduce the layout issue. Are you running anything that scales your windows UI? Could you provide a screenshot.

I didn't think users would want to miss out on any of the track while the announcements were being made, shows what I know....
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: aktor on January 13, 2025, 11:02:51 PM
yes windows are in 125% scale.
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: BoringName on January 13, 2025, 11:26:33 PM
yes windows are in 125% scale.

Is that just through windows display settings or a third party app?

If I change my scale and layout to 125% in windows display settings, everything still displays correctly. It's just larger....

I'm using windows 10, maybe it's a windows 11 issue?

Confirmed it is a windows 11 issue to do with DPI settings. I'll see what I can do.
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: BoringName on January 14, 2025, 10:09:40 AM
New version - mb_VerBeeliser_1.1.zip (https://www.mediafire.com/file/2rnhklozb6d5ddu/mb_VerBeeliser_1.1.zip/file)

Changes
- Hopefully fixed layout issues with windows 11 at higher DPI settings (not that confident I have). I have no way to test it.
- Moved the process to a separate thread so it runs a bit smoother and doesn't cause issues with Musicbee's player state.
- New Option "Do not pause track", when enabled VerBeeliser will speak over the stop of the track.
- New Option "Hotkey Only", When enabled VerBeeliser will only speak when the hotkey is used.
- New Option "Track Volume Offset", The track volume will be lowered by this amount when VerBeeliser speaks.

Known issue when "End of Track" is ticked.
Right clicking a track and selecting Play Now triggers a PlayerStateChanged notification for PlayState.Stopped followed by a second notification for PlayState.Playing. This notification also triggers for PlayState.Stopped when Musicbee has finished playing a list of tracks. I use this to announce the last track played as the usual notification I use (TrackChanging) doesn't trigger at the end of the last track.

I couldn't see a way to determine if the user clicked "Play Now" or a list of tracks just finished playing. The best I could come up with was checking the track supplied by the notification against the last track in the Now Playing List and if it matched, announce the details. This means under certain circumstances selecting "Play Now" on a track will result in VerBeeliser announcing at the start of the track even if you have "end of track" ticked. The main circumstance being that you select "Play Now" on a track that is currently the last track in the now playing list. Another would be selecting Play Now on a track while the last track in the Now Playing List is playing.

There might be a better way to do it but for now that's how it works. After the initial song it will announce properly as Musicbee transitions to subsequent songs.

It also won't announce the same track two times in a row which is a measure to stop it constantly announcing from the user pushing stop/pause etc... So if you are playing around testing and it doesn't trigger just make sure that's not the reason before reporting a problem. This also means it if you have the same song listed 5 times in the now playing list, it will only announce for the first track if they are listed consecutively with no other tracks inbetween.

I intended to make the Track Volume Offset a negative range but came across a bug I couldn't solve.

For anyone else that might come across this or know a solution. I had the 2 numericUpDown elements set with different min/max values.
Volume offset: 0 min and 100 max.
Track volume offset:  -100 min and 0 max.

When configured this way, any attempt to set a value to either of these when loading the config page resulted in an out of range exception even when the value was in the valid range. It didn't matter which one I chose to set or what value I used. It's like it was checking the value against the min/max thresholds of both controls. Setting the value to zero was the only way it worked, I assume because that's the only overlapping value between their thresholds. Once the page loaded I could use the controls to set values within their min/max ranges but once I saved and tried to re-open the config page the error occurred again.

I tried cleaning and rebuilding in Visual studio, deleting both controls and adding them again. Setting the min/max values at runtime. The only solution was setting both their min/max values to 0/100.
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: aktor on January 14, 2025, 04:40:12 PM
That scaling bug it is still there.
Check boxes should be before text.
Otherwise good job. Thank you.
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: BoringName on January 15, 2025, 05:01:15 AM
New Version - mb_VerBeeliser_1.1.1.zip (https://www.mediafire.com/file/jtx4fck91i3cviu/mb_VerBeeliser_1.1.1.zip/file)

Changes
- Changed to DPI scaling instead of font scaling to try and solve the windows 11 layout issue.
- layout changes on the config panel

Let me know how that goes. I have a few more options to try but I'm trying the easier ones first.
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: aktor on January 15, 2025, 10:26:33 AM
Scaling: Improvement. OK and cancel visible. But voice selector still hidden.
Prefix/ suffix: If a key is used as hotkey the letter doesn't type in.
Voice Option: Plugin uses the system audio but if someone uses USB DAC ( like me) or wifi streamer an option to select audio output would be useful.
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: BoringName on January 15, 2025, 10:39:07 AM
Scaling: Improvement. OK and cancel visible. But voice selector still hidden.

Progress. Is the voice selector invisible or has it just been covered up by other elements? An image would be good.

Prefix/ suffix: If a key is used as hotkey the letter doesn't type in.

I'm not sure what you mean. The code is exactly the same whether triggered by a hotkey or track transition.

Voice Option: Plugin uses the system audio but if someone uses USB DAC ( like me) or wifi streamer an option to select audio output would be useful.

I had a bunch of code for selecting different audio devices when I made VUMeter but I think I got rid of it.... I'll check my backups. It shouldn't be too hard to sort out.
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: aktor on January 15, 2025, 11:36:44 AM
(https://imgur.com/a/Bpxk7hH)
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: karbock on January 15, 2025, 12:06:49 PM
(https://imgur.com/a/Bpxk7hH)
Image posted by aktor:
(https://i.imgur.com/47H4Zzm.png)

@aktor: the image is invisible in your post.
This BBcode works:
[img]https://i.imgur.com/47H4Zzm.png[/img]
but this not:
[img]https://imgur.com/a/Bpxk7hH[/img]

To get the correct URL:
- from within ImgUr, right-click in the picture -> Open picture in new tab
- copy new URL

... or upload the picture with ShareX, and get the BBcode from its menus.
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: aktor on January 15, 2025, 12:47:28 PM
thanks
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: boroda on January 15, 2025, 02:31:34 PM
Prefix/ suffix: If a key is used as hotkey the letter doesn't type in.

I'm not sure what you mean. The code is exactly the same whether triggered by a hotkey or track transition.

i think aktor means that if you assign e.g. button 'd' as MB hotkey, then you won't be able to type letter 'd' in any standard .net control. (text box, combo box, etc.) such a button will work as hotkey instead. Steven has addressed this issue ages ago. here is the exempt from AT&RT's source code:

c# designer file of some command
Code
            ...
            this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.dataGridViewTextBoxColumn7 = new System.Windows.Forms.DataGridViewTextBoxColumn();

            //MusicBee
            this.templateNameTextBox = ControlsTools.NewMusicBeeTextBox();
            //~MusicBee            

            ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
            this.splitContainer1.Panel1.SuspendLayout();
            this.splitContainer1.Panel2.SuspendLayout();
            this.splitContainer1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.templateTable)).BeginInit();
            ...

insert such code right after the last 'new' operator. be aware that you must insert this code every time after using VS form editor.

here is helper ControlsTools.NewMusicBeeTextBox() method
Code
    internal static class ControlsTools
    {
        ...
        internal static TextBox NewMusicBeeTextBox()
        {
            return (TextBox)Plugin.MbApiInterface.MB_AddPanel(null, Plugin.PluginPanelDock.TextBox);
        }
        ...
    }
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: aktor on January 15, 2025, 03:06:56 PM
yes i ment exactly that
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: BoringName on January 16, 2025, 02:08:52 AM

i think aktor means that if you assign e.g. button 'd' as MB hotkey, then you won't be able to type letter 'd' in any standard .net control. (text box, combo box, etc.) such a button will work as hotkey instead. Steven has addressed this issue ages ago. here is the exempt from AT&RT's source code:

Righto, thanks. I had mine set to ALT+Z for testing so it's not an issue I encountered. That shouldn't be too hard to fix up.
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: BoringName on January 16, 2025, 04:31:38 AM
New version - mb_VerBeeliser_1.2.zip (https://www.mediafire.com/file/jy53u7qn0ble7hn/mb_VerBeeliser_1.2.zip/file)

Changes
- Changed some elements to hopefully fix scaling problems.
- Single or shifted hotkey characters will no longer trigger when editing tags. Other modified hotkeys will still trigger eg) ALT+Z

I want to get this stupid layout issue sorted first before I start adding more elements to handle different audio devices.
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: boroda on January 16, 2025, 06:51:58 AM
btw, what is the issue with high dpi scaling on win11? i don't have win11, so can't test it myself. just curious if AT&RT has the same scaling issue on win11 because i never did any workarounds for this.
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: BoringName on January 16, 2025, 07:50:28 AM
btw, what is the issue with high dpi scaling on win11? i don't have win11, so can't test it myself. just curious if AT&RT has the same scaling issue on win11 because i never did any workarounds for this.

Windows 11 scales differently to windows 10 when scaling is set to more than 100%. It's only an issue with Winforms and not WPF.

When I first setup the config page I used ListBoxes but when I considered adding the prefix/suffix settings, I realised it wasn't going to work so I changed the right one to a ListView instead. I didn't change the left one because it worked for what I needed and it was easier than having to change over all the mouse/dragdrop events.

But as you can see from Aktor's screenshot, the listBox element hasn't scaled correctly vertically. The ListView column widths are not correct either. In the latest version I changed the remaining ListBox to a ListView and added some code that hopefully sets the column widths correctly as well.

I should probably setup a virtualBox for windows 11 so I can test it properly.

edit: It might also just be an issue with the net version it's targeting. Currently its 4.8, from some of the google results I think 6.0 might fix up a lot of the issues. But I don't think plugins will initialise in MusicBee with 6.0 yet.
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: aktor on January 16, 2025, 09:55:16 AM
Scaling is fixed.
Typing is fixed.
No bugs.
good job
thanks
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: BoringName on January 16, 2025, 09:27:49 PM
Scaling is fixed.

Thanks for confirming. So it seems the main culprit was the ListBox element. I found a few references on the dotnet github to do with ListBoxes and things not scaling properly with hi DPI. I'd recommend using a ListView or a DataGrid instead.
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: BoringName on January 17, 2025, 09:42:56 AM
New version - mb_VerBeeliser_1.3.zip (https://www.mediafire.com/file/1t909do8xdkknga/mb_VerBeeliser_1.3.zip/file)

Changes
- New option to select the output device for VerBeeliser.

I'm using CSCore audio library as some users had issues with NAudio when I was playing around with that for VUMeter. Hopefully this one doesn't have the same problems.

It's currently set for WASAPI shared mode.

It will only list devices that were active when the plugin starts up so if you plug in a new device you will need to restart Musicbee for it to show up in the list. If it can't find the current saved device on startup it will default to the default audio device on the system.

I have limited ability to test this thing so keep that in mind. I was able to have VerBeeliser come out of my monitor speakers (That I only found out existed today) via an Nvidia graphics card while the music was coming out of my PC speakers.

Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: sveakul on January 17, 2025, 11:37:12 AM
I don't use this personally, but I have to compliment you on creating this, quite a piece of work to implement and I'm sure many will be glad to have this available.  Thank you for your effort!  I'm glad you didn't let your plugin development work stop after VUMeter.  Got any more in ya??  As I mentioned before a stable VSTHost/Bridge would be nice but you said there was something that provided an obstacle there.
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: BoringName on January 17, 2025, 11:58:17 AM
I don't use this personally, but I have to compliment you on creating this, quite a piece of work to implement and I'm sure many will be glad to have this available.  Thank you for your effort!  I'm glad you didn't let your plugin development work stop after VUMeter.  Got any more in ya??  As I mentioned before a stable VSTHost/Bridge would be nice but you said there was something that provided an obstacle there.

Well, after Hiccup went AWOL for a month I had no-one giving me ideas/work for VUMeter :)

I saw an old post about this and when I found how easy it was to implement text to speech in windows it was a no brainer, I slapped it all together in a few hours. It helps to have an existing plugin to modify instead of starting from scratch. What took a long time was getting Musicbee to play nice with pausing/resuming but that was my own fault for not running it in a separate thread from the beginning like I should have done. And the windows 11 UI nonsense.

Pretty much no chance of the VST stuff. Its something Steven would have to implement.

I'm open to other ideas....
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: aktor on January 17, 2025, 07:51:48 PM
A plugin for airplay 2?
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: BoringName on January 17, 2025, 10:52:27 PM
A plugin for airplay 2?

Aside from my complete disdain for apple, it's already been done.

http://emilles.dyndns.org/software/out_apx.html

It comes with an installer and supports Foobar2000, MediaMonkey, MusicBee, Winamp, or XMPlay

Yeah, it's not free but if you're already buying apple products I doubt $10 is going to hurt your wallet. Plus they deserve it.
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: aktor on January 18, 2025, 08:39:58 AM
Thanks for info. But apple air is not exclusively on apple products. It is used for streaming.
https://www.wiimhome.com/wiimmini/technology Seems like a good and cheap product.
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: BoringName on January 18, 2025, 11:18:03 AM
Thanks for info. But apple air is not exclusively on apple products. It is used for streaming.
https://www.wiimhome.com/wiimmini/technology Seems like a good and cheap product.

And how much would that device sell for if it didn't have to pay royalties for something bluetooth already does?

In any case, my point still stands, if you are forking out that much for a device, what's another 3%-4% for Musicbee support.

It's all off topic anyway, I know I poked the bear in this thread stating I was open to anything but this all belongs in the wishlist section of the forum. Feel free to post anything you (or anyone else) want in there and if it tweaks my interest I will get involved.
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: aktor on January 18, 2025, 11:46:51 AM
I am off topic here but its not bluetooth (not capable of lossless streaming) its 5G Wi FI (capable of lossless). And for some reason the cheap variants of the product don't support google (chrome) cast. I personally think MB should natively support those protocols to not be left behind because they have become so widely used by younger people that are in the middle between audiophiles and casual users.
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: voodoopunk on January 18, 2025, 12:40:10 PM
I am off topic here but its not bluetooth (not capable of lossless streaming) its 5G Wi FI (capable of lossless). And for some reason the cheap variants of the product don't support google (chrome) cast. I personally think MB should natively support those protocols to not be left behind because they have become so widely used by younger people that are in the middle between audiophiles and casual users.
What?

Aren't these protocols supported due to the fact that you can stream music through your purchased hardware?
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: BoringName on January 18, 2025, 12:44:17 PM
I don't know why you would bother with WiFi when you can use LASERS!!!! (https://www.youtube.com/watch?v=1H4FuNAByUs)
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: voodoopunk on January 18, 2025, 12:46:21 PM
I don't know why you would bother with WiFi when you can use LASERS!!!! (https://www.youtube.com/watch?v=1H4FuNAByUs)
My preference is a couple of cans and some string... old skool!
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: hiccup on January 18, 2025, 03:46:45 PM
I'm open to other ideas....
Allow me to join the ranks of off-topic posters to this thread ;-)

There is one existing plugin that many, many MusicBee users would love to see updated,  improved and maintained.
It's the UPnP/DLNA plugin (https://getmusicbee.com/forum/index.php?topic=14277.msg85344#msg85344) that was created by Steven.

But I'm aware that this is pretty much an unrealistic ask/suggestion.
Reasons being:
–  Steven giving up on it to me indicates it is a project much to complicated for a single developer who is only able to invest some of his free-time.
– It will probably require the developer to have direct access to-/ownership of various brands and types of hardware devices being capable functioning as a UPnP/DNLA renderer.
– It will require a lot of testing, both by the developer and by users that will need to properly share and report their findings and experiences, which probably not many people will be willing or able to do.

So, please excuse me for being a bit off-topic and unrealistic.  ;-)
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: MusicBorg on January 19, 2025, 06:43:03 PM
Just an observation:

Looking for the latest version of a plugin, the start post is usually a good place to look first.
But in this case the start post only has the link to the first version (1.0), and finding the most recent version requires searching through all posts.
It may be better if the start post was updated to (always) contain the latest version?
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: BoringName on January 21, 2025, 04:23:48 AM
It may be better if the start post was updated to (always) contain the latest version?

I've modified the first post to link to the plugin page (https://getmusicbee.com/addons/plugins/529/verbeeliser/). The latest version is always available on that page (when I remember to update the link...).

There is one existing plugin that many, many MusicBee users would love to see updated,  improved and maintained.
It's the UPnP/DLNA plugin (https://getmusicbee.com/forum/index.php?topic=14277.msg85344#msg85344) that was created by Steven.

I did look at that. It's a decent size plugin with lots of elements. It might be a little beyond me as it deals with a few things I have zero experience in. I'm taking a small break from coding stuff, we'll see after that.
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: Luk on April 27, 2025, 11:08:10 AM
Thanks, BoringName!
Title: Re: VerBeeliser Track Information Announcer Plugin
Post by: BoringName on May 02, 2025, 06:52:15 AM
Thanks, BoringName!

You're welcome. It's had over 100 downloads so I guess it's getting a little bit of use (who knows how many downloads are bots) and no issues popping up in here is a good sign it just works...... I hope.