Wednesday, January 12, 2011

River Connected to the Ocean

I've learned a LOT in the past 24 hours, and River has a new key skill as well -- she can browse the internet.

The Language Debate

Yesterday started with me debating about switching the programming language I'm using. I considered switching to Python, because development would be considerably faster in some areas (such as internet connectivity). Python has so many freely available libraries that much of my work would be done for me as I progressed. However, after spending several hours getting Python set up and beginning to recreate Project River, I discovered that I was faced with a key limitation.

In the 64 bit versions of Windows 7 (and Vista), the Microsoft Speech Engine has some serious quirks. By default, you can only use 64 bit "voices" for the text-to-speech component. This is a significant problem, because the best voices out there right now are 32 bit. In fact, you're hard pressed to find any 64 bit voices, unless you're shelling out around $1,000.

In C++, I am able to skirt around this implementation, since the method for getting and using the voices on the system ignores the 64 bit requirement. However, in Python (as well as C# and VB), there is no way around this limitation.

Since the believability of the AI is so important to me, and I feel that the voice plays a critical role in this, I decided that if for no other reason, I need to stick with C++ for now.

Implementation of libcURL

It took me a considerable amount of time, but I finally managed to get libcURL compiled properly, and River can now successfully make cURL calls to browse internet pages on the fly.

In the process of trying to set this up, I learned a great deal about static libraries, including both how to create one, and how to use one in my project. As a result, I completely restructured River's file system, so that she follows a much more standardized pattern, with all external headers and library files contained in a single location. I also took a few key classes that I was using and I knew I wasn't likely to change again, and I made them into external libraries.

Overall River has come very far in the past 24 hours. I am confident I chose the correct programming language for the project, and I have significantly improved my knowledge of Visual Studio 2010 as well as some of the best practices in C++.

Next Steps

Getting libcURL set up was merely a precursor to actually using it. Now comes the tedious work of writing and/or implementing a few APIs for her to be able to interact with key websites.

The next large task of setting up constant ongoing training of the Speech Recognition engine is still on the table, but I intend to save that for a weekend, as I believe it will be a very large and time consuming task.

No comments:

Post a Comment