Hello! I've just finished coding a working version of my first plugin, foo_talktome. I wanted a plugin to read the title and artist of each track that played, because I often listen to music on my wireless headphones. When I listen to my whole library or a group of new albums on random, this helps me remember who/what I liked. Hopefully others will enjoy this too!

Before writing this I checked if it existed already, and I found foo_tts, written by paulski. It seemed development on that had stopped, however, and there were even requests for a new version, so I went ahead with my little project. Hopefully I'm not stepping on any other devs' toes with this!

Just put the dll in the Components directory and it should add a menu option (under Playback) to turn it off/on.

Please use the issue tracker on the BitBucket Repo to report bugs/feature requests.

--------------------------------------------------Update! Version 1.0 released May 7, 20122013 (That's a long time between updates.)

Thanks to danthe0 some major unicode-related bugs have been addressed. Now you should be able to get this working with Asian characters/voices. I am also now building with the latest SDK version, so you will need Foobar2000 v1.1 to use this component (sorry! if you need/want an older version please let me know - I may have it). Thanks to everyone who uses this component, and especially those of you who contribute feedback, bug reports, and even code! To celebrate these major changes/improvements, I am bumping the version number to 1.0.

Along with this new version, I am officially announcing the code as open source. The source has been up for a while, but I just realized I never made that announcement here.

Finally, my use of this plugin has diminished, hence the slowdown in development. I know there is another TTS plugin out now, and it seems to have some really cool features. However, I am happy to keep working on this if there is still interest in foo_talktome. I am also interested in helping/working with other developers to create TTS or other interesting Foobar components - just PM me if you'd like to work together on something.

Hey everyone. I'm glad people are still getting use out of this plugin! I halted development for a while because things seemed to be working pretty well, but I know there are some serious bugs out there still. In order to keep up with everything, I'd like to move development and issue tracking over to my Bitbucket repository:

There is a public wiki and issue tracker there, and you don't need an account to post on the issue tracker (though it's better if you make one). I've added a few issues/feature requests from this thread to the system there, but I'm sure I missed quite a few. If you have an issue or feature request, please add it on the Bitbucket issue tracker.

This is also my first step toward releasing the source code for this plugin, just so the project can live on even if I become too busy to maintain it. I'm not quite ready to do that, though, as I'm still a bit shy about my coding abilities.

--------------------------------------------------June 22, 2010 - OK, it took some playing around, but the new version seems to be working!

Download foo_talktome v0.4

(Hopefully) Fixed in this version:* No more dll dependencies, everything should be statically linked (Still figuring out dependency walker, but I hope it's working)* Remembers the state on shutdown

Thanks again to everyone who has downloaded or shown interest in my plugin! This has been a great learning experience for me so far.

--------------------------------------------------June 28, 2010 - A new version is released!

Download foo_talktome v0.5

New features:* A preferences pane!* You decide the speech formatting (uses built-in Foobar2000 title formatting strings)* An option to pause playback while speaking

I also tried to fix the 0 volume bug that was brought up. I was never able to reproduce it, though, so I'm not sure the changes worked. I've taken note of the other suggestions in this thread (volume fading when speaking, announcing at the end of the song...), and I will try to work on them over time, but implementation of some of them is not quite straightforward to me.

As far as other voices go, you can set the voice in the Windows speech control panel. You can install other voices, but they tend to not be free and/or easy to find. The voice engines from Neospeech have been recommended in this thread (thanks Andreasvb).

--------------------------------------------------July 01, 2010 - Another new version is released!

Download foo_talktome.dll v0.5.1(I don't know anything about version numbering andI felt I was approaching 1.0 much too quickly so I moved to a double-point system. Why not?)

Fixes/features:* Improved volume scaling - this was indeed a linear/logarithmic scale thing (thanks kode54). Sadly the only reason I didn't do it properly the first time around is because I didn't have a pen or pencil handy. I'm pretty happy with the way it is now, but I may add another option to lower/boost the volume of the voice relative to the music if there is a lot of demand.* Much bigger box for the speech formatting string. Thank carpman for requesting this - I never would have thought of it otherwise. Should accept 2048 characters or so now, hopefully that's big enough.

Enjoy!

--------------------------------------------------July 19, 2010

Download foo_talktome.dll v0.6

Features:* Now includes a volume-offset field in the preferences pane. You can use a negative or a positive offset, input in dB.

Hopefully this is helpful for some people.

NOTE: For those of you that keep Foobar set at 0.0dB attenuation (max volume) this will only help you make the TTS voice quieter. At this point I can only control the volume of the synthesized voice. If you want the voice louder relative to the music, try boosting your system volume, lowering your Foobar volume, and adding a positive volume offset in the TalkToMe preferences.

I used the old version before, until it stopped working in newer versions.

However, I found a way to get it announce the song, not optimal, but works.It requires a bit tinkering.

This is what I used:

Cepstral: TTS program.AMIP: For executing a command using swift.exe (comes with Cepstral).

Preset in AMIP:/exec:(swift.exe) -p "%2 . by , %1"

I tried your component, it's working perfectly!

Even got another voice working, NeoSpeech Julie. It sounds really life-like.If anyone want to use additional voices on 64 bit(unless they already are), just change it from the 32 bit SAPI settings.C:\Windows\sysWOW64\speech\SpeechUX\SAPI.cpl

Failed to load DLL: foo_talktome.dllReason: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.

First of all, thanks to both of you for trying out my plugin! This is my first "published" project, and it's good to know even one other person is using it.

My guess is that this is a "side-by-side configuration" error which has something to do with specific versions of certain dlls on windows system. I think it's the Microsoft solution to dll hell. I'm using Visual Studio 2008, so my program is linked to the dll files that come with it. You can install the VS2008 redistributable package if you are willing, and I think it will fix the problem. It's only a 4MB download, but it's still a hassle to have to urge users to install something else just to run my measly component.

I'll try to build the component again with statically linked dependencies, which should make this issue go away. I'm not sure exactly how to do that (kind of new to Visual Studio) but I think I can figure it out relatively quickly. In the mean time, I hope the VS2008 redistributable package solves the problem for anyone who encounters it.

I'll try to build the component again with statically linked dependencies, which should make this issue go away. I'm not sure exactly how to do that (kind of new to Visual Studio) but I think I can figure it out relatively quickly. In the mean time, I hope the VS2008 redistributable package solves the problem for anyone who encounters it.

I just rebuilt the application and I think it's all statically linked now. Anyone who was getting the "configuration error" upon loading should re-download (the link in the first post is updated) and try again. Unfortunately I don't have access to any computer without VS2008 (or at least the redistributable package) installed, so I can't test this myself.

Please let me know if this problem remains, and likewise if you encounter any other problems with this component.

Thanks everyone. I'm working on getting things statically linked, so I appreciate the suggestions and reports. My dll is like 105k now, so I may have figured it out, and I am going to run it though the dependency walker.

I am also working on saving the state of the plugin, but it may require some restructuring of the plugin. I will definitely have that working in the next release.

A little req, have it fade down the volume during the speech, like the original component.And maybe announce before the next song.

Thanks again.

I appreciate both the compliments and the requests. I am working on a preferences pane that should make the plugin much more customizable, and I'll definitely keep your suggestions in mind for it. I have no prior experience with WTL programming, though, so that may take a little longer to figure out!

2) Suggestion: Is there any way to enter options re. title formatting to alter what gets announced? Currently, unless I've missed something, there's only %title% by %artist%.

It would be really good if we could enter a script in a settings dialogue. I want to use this component for comparing different versions of classical pieces, while away from the computer: So I want something like: %title% by %artist% performed by %performer%

i.e. String Quartet No.4 in D major - Allegretto by Shostakovich performed by St Petersburg Quartet.

This then becomes quite a long intro, so:

3) suggestion: Is it possible to delay the music until the introduction has finished?

4) Is it possible to get alternative voice styles, and would this be possible via a drop down menu in a settings panel?

Regardless of whether you choose to impliment any of the above, I hope it's food for thought and potentially helpful. Thanks for the component - appreciate your effort, and look forward to future developments.

Cheers,

C.

EDIT: Just realised that some of this is already covered by Andreasvb. So read as a +1.

EDIT2: It's not as bad as it first appeared. To reproduce: 1) Vol set to 02) Begins new song (thus intro begins)3) If closed at that point, when fb2k re-opened the nasty noise happens.

Pretty unlikely scenario, but somehow I happened upon it, so possible.

New features:* A preferences pane!* You decide the speech formatting (uses built-in Foobar2000 title formatting strings)* An option to pause playback while speaking

I also tried to fix the 0 volume bug that was brought up. I was never able to reproduce it, though, so I'm not sure the changes worked. I've taken note of the other suggestions in this thread (volume fading when speaking, announcing at the end of the song...), and I will try to work on them over time, but implementation of some of them is not quite straightforward to me.

As far as other voices go, you can set the voice in the Windows speech control panel. You can install other voices, but they tend to not be free and/or easy to find.

Enjoying your plugin. I have 2 more suggestions, if you have the time and inclination:

1) Is it possible to extend the title formatting code box by quite a bit (perhaps even a few lines)? Personally, I've got some conditional code to announce classical music differently from other genres, and also I'm finding the $replace function handy, as VIII pronounced "Vee-eye-eye-eye", wears thin rather quickly.

2) Would it be possible to have an option to set the volume of the TTS voice as a % (or whatever) of the music? I've tried setting this in the Control Panel options, but it seems that the plugin uses which ever sound output option fb2k uses, which makes sense, but that means that one cannot control the relative volumes. At present my TTS voice is too loud in comparison to the music.

Many thanks for your already excellent plugin and for considering the above.

1) Is it possible to extend the title formatting code box by quite a bit...

This should be fairly simple. I will definitely expand it to allow/show more characters, and I will look into allowing multiple lines of text.

QUOTE

2) Would it be possible to have an option to set the volume of the TTS voice as a % (or whatever) of the music?

This is also definitely do-able, but will probably take a little longer. I had a field for a "volume offset" in the preferences panel, but it wasn't working how I wanted it to so I left it out of the release. I just need to play around a bit to work out the different scales that Foobar and the TTS API use.

Download foo_talktome.dll v0.5.1(I don't know anything about version numbering andI felt I was approaching 1.0 much too quickly so I moved to a double-point system. Why not?)

Fixes/features:* Improved volume scaling - this was indeed a linear/logarithmic scale thing (thanks kode54). Sadly the only reason I didn't do it properly the first time around is because I didn't have a pen or pencil handy. I'm pretty happy with the way it is now, but I may add another option to lower/boost the volume of the voice relative to the music if there is a lot of demand.* Much bigger box for the speech formatting string. Thank carpman for requesting this - I never would have thought of it otherwise. Should accept 2048 characters or so now, hopefully that's big enough.

Wow, that was fast!Works for me -- really well. Just out of interest, how have you scaled the TTS voice? Presumably you can't know in advance how loud the TTS voice will be, so how does your plugin decide the ratio?

I am inverting the dB scale that Foobar uses to get a linear scale of 0-100 (what the TTS voice takes as a volume, only integer values). This is basically the same as how the Foobar volume control works; if you look, the actual dB value falls off much more quickly as you move to the low end.

The equation I use is:TTS_volume = 100*10^(foobar_volume/20)

which comes from the equation for audio decibels (a relative measure):dB = 20*log(P/Pref); where I use Pref = 100, the maximum TTS volume.This gives the TTS voice a volume of 100 when Foobar's attenuation is 0dB, and ~0 when Foobar's attenuation is -100dB. I'm also not doing any rounding (laziness), so a value of (say) 13.94 will just get truncated to 13.

I just tried it at home (using Microsoft Anna on Win7) and it seems a little quiet. It's basically perfect (for me) on my other computer with Neospeech Julie, though, so the voice-dependent thing could work against people. This makes me want to implement another setting to boost/drop the voice a bit, so something like that will probably be in the next release I'll play around with it a little to see what method seems to work best for that.