James Manning's Blog

February 16, 2007

Oddly enough, Firefox 1.5 was more stable for me

Filed under: microsoft — manningj @ 2:28 am

February 15, 2007

Windows shortcuts – it's what's for dinner

Filed under: microsoft — manningj @ 2:36 am

I didn’t know all of these.

http://shellrevealed.com/blogs/shellblog/archive/2006/10/16/Do-things-faster-with-Keyboard-Shortcuts.aspx

F6

Cycle focus to next UI element in Explorer

January 7, 2007

Firefox feature I really miss in IE7

Filed under: microsoft — manningj @ 6:58 pm

Sometimes, it’s the little things.

I love that Firefox shows you the title of the last time you loaded a URL – it makes it much easier to tell which page is the one you really want.  Like the “crosscity.com” entries below – without the title, I’d have to load each before figuring out which one was the one I wanted.

No such luck in IE7, though – all you get from the completion list is the URL itself.

One other point (not a feature I miss, though) - you’ll notice that in firefox the favicon (just to the left of the address you’re typing in) immediately blanks once you start typing – IE7 doesn’t do that, so while I’m about to go to a microsoft site, the favicon is still Google’s (see above).

January 6, 2007

recent hardware upgrades to the Vista box

Filed under: microsoft — manningj @ 1:19 pm

So, as you may remember from previous postings, I was using the integrated graphics in this Dell Dimension 4700 box, and while they passed all the non-WDDM (IOW, hardware) specs for Aero (Pixel Shader 2.0, DirectX 9.0, 128MB, 32bpp, etc. etc.), no WDDM driver existed so no Aero for me. 

I was actually fine with that up until Windows Movie Maker wouldn’t run because if it.  Now, I could have gone a different route (use XP in a VPC, use Jessica’s XP machine, use something on the linux box, use a different app on the Vista box, etc.) but since I had a long-term goal of getting dual-monitor on the dell anyway, it gave me an excuse and outlet for some christmas gift cards.

Since I’m still pretty cheap, though, I picked up the Sapphire (ATI) Radeon X1300 card for $47 (newegg) and the second monitor was a Samsung 931B 19″ LCD for $230 (bestbuy.com with free shipping… that’s where my gift card was and it’s an easier return than a web-only shop :) .  Oh, and since the Samsung didn’t come with it, a $15 DVI cable from Amazon (I had a Dr. Seuss book I needed to order anyway, so it was free shipping).  Since the card does dual-monitor via 1 analog and 1 digital connection (same as my setup at work), I needed the DVI cable since the Dell E193FP I already had is analog-only.

The only downside is I didn’t expect that the on-board fan for this card would be quite as loud as it is.  It’s not horrific, but the machine’s now definitely louder than it was before this card :)

December 28, 2006

lack of support for Vista / IE 7 on web sites

Filed under: microsoft — manningj @ 4:29 am

I wanted to check the local wal-mart’s advertised sales – clicking around, I got here

Unfortunately, clicking on “December Advertised Values” gets me a page saying I’m not using a supported “computer configuration” (both from Firefox 1.5.0.9 and MSIE 7.0)

http://walmart.richfx.com.edgesuite.net/catalog_walmart/december3_2006/error/error.aspx

  1. doing an explicit OS check seems dumb – hopefully they’re not doing that, but it’s certainly possible given the platforms Firefox runs on.
  2. hopefully they’re not checking specifically for IE 5 or 6 (there are published best practices)
  3. I’m curious exactly what the “Microsoft Windows web site” is going to tell me in terms of how to upgrade from Vista to 98, 2000, ME, or XP.
  4. Yes, Vista isn’t widely available yet.  However, a *ton* of sites have managed to update just fine for Vista and IE 7.  Anybody serious enough to be using Akamai (edgesuite.net in the URL) should know better.
  5. While the “User Agent String Utility” exists for IE 7, I was surprised that Firefox didn’t have easier User-Agent modification.  Yes, I know about Opera :)

December 21, 2006

recognize .wav file using System.Speech from .NET 3.0

Filed under: .net,microsoft — manningj @ 12:00 pm

It’s a tiny little app since they provide you the right methods in their object model (at least for .wav files :)

 

using System;
using System.IO;
using System.Speech.Recognition;

namespace Recog
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length != 1)
            {
                Console.Error.WriteLine("Usage: Recog <file.wav>");
                Environment.Exit(1);
            }
            string wavfile = Path.GetFullPath(args[0]);
            if (!File.Exists(wavfile))
            {
                Console.Error.WriteLine("Error: Cannot find file {0}", wavfile);
                Environment.Exit(1);
            }

            DictationGrammar dictationGrammer = new DictationGrammar();
            using (SpeechRecognitionEngine engine = new SpeechRecognitionEngine())
            {
                Console.WriteLine("Using default recognizer: {0} [{1}]", engine.RecognizerInfo.Id, engine.RecognizerInfo.Description);
                engine.LoadGrammar(dictationGrammer);
                engine.SetInputToWaveFile(wavfile);

                while (true)
                {
                    try
                    {
                        Console.WriteLine("Calling engine.Recognize");
                        RecognitionResult result = engine.Recognize();
                        if (result == null)
                        {
                            Console.Error.WriteLine("Exiting by way of Recognize returning null");
                            break;
                        }
                        Console.WriteLine("Recognized text of {0} [confidence {1}]", result.Text, result.Confidence);
                    }
                    catch (InvalidOperationException)
                    {
                        Console.Error.WriteLine("Exiting by way of Recognize throwing InvalidOperationException");
                        break;
                    }
                }
            }
        }
    }
}

December 20, 2006

quickie notes on Vista speech recognition through System.Speech (.NET 3.0)

Filed under: .net,microsoft — manningj @ 7:45 pm

Just to play around with it, I wrote a quickie app to call the .NET 3.0 interfaces for Vista’s speech recognition.  In particular, it accepts a .wav file as a param and just has the recognition engine run over that.

Some quick notes:

  • The default recognition engine isn’t necessarily the one you want.
  • On my system, I have 3 installed, one of which is the one from Office 2003 (still installed on the machine).  This appears to be the one I’m getting by default when I don’t specifically specify the recognizer to use.  Calling SpeechRecognitionEngine.InstalledRecognizers() gives, for me:
  • Installed recognizer: MS-1033-61-DESK [Microsoft English (U.S.) v6.1 Recognizer]  <– this is likely the one from Office 2003, and is the one I got by default
  • Installed recognizer: MS-1033-80-DESK [Microsoft Speech Recognizer 8.0 for Windows (English - US)]
  • Installed recognizer: MS-2057-80-DESK [Microsoft Speech Recognizer 8.0 for Windows (English - UK)]
  • When I’m constructing the SpeechRecognitionEngine, using “MS-1033-80-DESK” for the recognizerId string works fine and gets me the recognition I expect.
  • The API seems to assume you want call Recognize or RecognizeAsync multiple times.
  • While looping, there’s no way to check when to end (when to stop calling Recognize) except for checking when you get an InvalidOperationException.  Here’s some quickie PowerShell showing 2 valid calls and then the invalid one once we reach the end of the (short) wav file.  I really hate how end-of-file is an exception since it’s NOT an exceptional condition (at least in the pre-recorded audio sense – I understand why it is for a microphone).
    • C:\> [void][reflection.assembly]::loadwithpartialname(‘system.speech’)
      C:\> $rec = new-object ‘System.Speech.Recognition.SpeechRecognitionEngine’
      C:\> $rec.RecognizerInfo.Description
      Microsoft Speech Recognizer 8.0 for Windows (English – US)
      C:\> $rec.LoadGrammar((new-object ‘System.Speech.Recognition.DictationGrammar’))
      C:\> $rec.SetInputToWaveFile(‘C:\Documents and Settings\admin\Desktop\downloads\test.wav’)
      C:\> $rec.Recognize() | fl text,confidence
    • Text : This is a test 12345678
      Confidence : 0.6058533

      C:\> $rec.Recognize() | fl text,confidence

      Text : 910 this was a test
      Confidence : 0.6938771

      C:\> $rec.Recognize() | fl text,confidence
      Exception calling “Recognize” with “0″ argument(s): “No audio input is supplied to this recognizer. Use the method SetInputToDefaultAudioDevice if a microphone is connected to the system, otherwise use SetInputToWaveFile, SetInputToWaveStream or SetInputToAudioStream to perform speech recognition from pre-recorded audio.”
      At line:1 char:15
      + $rec.Recognize( <<<< ) | fl text,confidence
      C:\> $error[0].exception.innerexception.gettype().name
      InvalidOperationException
      C:\>

  • Recognition on “bad” input may actually return null from Recognize (and depending on the size of the file, may block for quite awhile).  Here’s a normal (comes with Vista) wav file.  It doesn’t have any actual speech in it.
    C:\> dir $env:windir\media\start.wav
    Directory: Microsoft.PowerShell.Core\FileSystem::C:\Windows\media
    Mode  LastWriteTime     Length Name
    —-  ————-     —— —-
    -a— 8/23/2001 8:00 AM   1192 start.wav
    • Here’s recognition on that file returning null
      C:\> $rec.SetInputToWaveFile(“$env:windir\media\start.wav”)
      C:\> $output = $rec.Recognize()
      C:\> $output -eq $null
      True

    in Vista, Sound Recorder now forces WMA

    Filed under: microsoft — manningj @ 3:38 am

    I wanted to make a simple .wav file for some testing.  I decided to use the Sound Recorder that’s been in Windows for awhile.

    Your only option for saving from the built-in Sound Recorder (assuming you’re not using the “N” edition for Europe et al) is WMA now - you can’t save as .wav any more.

    The help spells this out, but their phrasing of “By default” made it sound to me like there would be an option for .wav (and not just that the N editions used .wav still).

    Scanning around for something simple to convert the .wma files to .wav’s, this one seems simplest and least intrusive as a command-line app (that I can therefore most easily script).

    http://www.stud.uni-karlsruhe.de/~ua7i/wma2wav/

    http://www.stud.uni-karlsruhe.de/~ua7i/wma2wav/wmatowav.exe

    Glad I didn't just click Next,Next,Next

    Filed under: microsoft — manningj @ 2:57 am

    December 19, 2006

    Minix3 reliability features

    Filed under: microsoft — manningj @ 5:04 am

    http://www.minix3.org/reliability.html

    Most (if not all) of these showed up in other places first, but it’s still a nice page both of what Minix has done and of getting a good feel for what reliability development is like.

    It’s a refreshing change of thought process to approach your code from the perspective of “all code is very buggy, even what I’m writing right now”.  Trying to get your “has to work” code down to the axiomatic core, layering things on top in fault-tolerant ways, reducing dependency chain lengths during architecture design – lots of fun stuff to do.

    Reliability is, like security, also something you can (and should) consider at each level in the stack.  For instance, the .NET CLR has a lot of reliability features that are new in the 2.0 version.  Since this is the first version that was hosted in SQL Server, hopefully it’s obvious why the mandate for some of these was higher than it had been in the V1.x versions :)

    http://blogs.msdn.com/cbrumme/archive/2003/06/23/51482.aspx

    Older Posts »

    Blog at WordPress.com.