Wednesday, June 25, 2008

I'm sure most of you know about podcasts. Sites like .NET Rocks being one of the most popular for .NET developers. Sooner or later though, you just run out of podcasts. Especially if you, like me, try to waste no time - which includes walking your dog with an MP3 player plugged in :-)

There are also cases when the level of podcasts is way below what you would expect. Once you get a certain level of expertise in any subject, most of the podcasts start to sound lame and that is natural of course - a sign of you progress.

Worst case scenario however is, when there are no audio materials on the subject of interest. Been there, seen that, solved it.

Enter SpeechR.

A small tool that I wrote mostly for myself. SpeechR is a tool that allows me to take any text and convert it into an audio format (wave or mp3) so I can later put it on my MP3 player and listen to while... whatever I do that doesn't require focus.

With all the ebooks out there, with all those lenghty manuals or blog posts and a comming vacation on a beach... What more can a hardcore can you want.

Tool uses System.Speech namespace that was introduced with .NET 3.0 to generate sounds. System.Speech in turn uses Microsoft Speech API found in Windows. With version 5 it got pretty good. Just compare Microsoft Anna in Vista to Microsoft Sam in XP.

Of course, Microsoft's voice isn't perfect - far from it. There are however commercial voices out there that are very good and cost ~30$.

Well. The tool is free, you can install it and enjoy. Please let me know what you think about it and what features you would like to see in v.Next().

Wednesday, June 25, 2008 7:37:27 PM (Central European Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [4]  | 
 Tuesday, June 24, 2008

I'm having some very strange problems lately with my Visual Studio. From time to time, a random feature just stops working. From not being able to pin/unpin windows, through random component not installed/missing, to just not being able to even start the IDE.

Some of the problems go away after restarting Visual Studio. Some of the problems go away after restarting Windows. Some of the problems just STAY!

After asking "Deep Thought" for the ultimate answer to life, I got it, and it was 42...

Naaah. Actually asking google was helpful in a way. It gave me some clues on what can I do to "reset" Visual Studio without reinstalling it or even worse, the whole Windows. The answer was:

devenv /resetskippkgs

Remember this one. You will need it. Sooner or later, but you will. It solves a lot of different issues.

Tuesday, June 24, 2008 9:08:45 PM (Central European Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [5]  | 

"Invalid URI: The Uri scheme is too long" - now that's a peculiar message. I got it while doing some Xslt transformations. It comes out that XslCompiledTransform can't just read any xml and transform it. There are issues if Uri scheme is too long. What is too long? Can't really tell, since mine wasn't THAT long.

The following code did not work for me:

XslCompiledTransform xsl = new XslCompiledTransform();
xsl.Load("t.xsl");
XmlWriter writer = XmlWriter.Create("dest.xml");
xsl.Transform(File.ReadAllText("source.xml"), writer);

So I had to use this one:

XslCompiledTransform xsl = new XslCompiledTransform();
xsl.Load("t.xsl");
using (XmlWriter writer = XmlWriter.Create("dest.xml"))
{
    using (XmlReader reader = XmlReader.Create("source.xml"))
    {
        xsl.Transform(reader, writer);
    }
}

The problem is the Transform method and File.ReadAllText that returns the whole source xml string at once. XslCompiledTransform just can't handle it for some reason.

Tuesday, June 24, 2008 9:01:05 PM (Central European Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [4]  |