I recently rediscovered SAPI, the Microsoft speech API. I used it a long time ago, and basically forgot about it. Which is a shame, because it is a really fun tool to play with. It is extremely easy to make your computer talk. While the voice is a bit aging under XP, the Vista voice is reasonnably good.
For those interested, here is how to call SAPI from C#.
Tuesday, February 3, 2009
Friday, December 12, 2008
[code] Compiling on a share with VC2005
While trying to compile on a share (with all permissions) I got an error message concerning the opening of a '.rsp' file. After a bit of search it turns out to be a known issue.
To fix it, simply redirect temporary files to a local directory, such as:
$(temp)\$(ProjectName)\$(ConfigurationName)
(setting in Configuration Properties -> General, Intermediate Directory)
More info on
http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=101276
To fix it, simply redirect temporary files to a local directory, such as:
$(temp)\$(ProjectName)\$(ConfigurationName)
(setting in Configuration Properties -> General, Intermediate Directory)
More info on
http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=101276
Friday, November 28, 2008
[tips] Sharing a folder from the command line
Ever had a (windows) laptop screen or graphics card died? (ie. the 'headless' computer effect). Well it just happened to me. Now, here is where it becomes tricky: How do you get to the files without taking the laptop apart? (you don't want to void the warranty, you don't trust support when they swear your data will be just fine).
One idea is to share folders so that you can access the files through the network. But that does not seem too easy without a screen... Well, usually you can get to log into windows without visual feedback. It is also fairly easy to launch a command line (CTRL-R (run) on XP; on Vista use the 'windows' key, type "cmd [enter]" and your are in). But, how can you share a folder from the command line, so that it will show up on the network?
I found the answer here: http://support.microsoft.com/kb/295622. There is a command line tool, WMIC, which lets you do many things, such as sharing a folder, from the command line. In principle you can even create the shared folder remotely. In my case it did not work out (password was refused for some reason) but I could do it 'blindly' from the command line.
Hope it helps!
One idea is to share folders so that you can access the files through the network. But that does not seem too easy without a screen... Well, usually you can get to log into windows without visual feedback. It is also fairly easy to launch a command line (CTRL-R (run) on XP; on Vista use the 'windows' key, type "cmd [enter]" and your are in). But, how can you share a folder from the command line, so that it will show up on the network?
I found the answer here: http://support.microsoft.com/kb/295622. There is a command line tool, WMIC, which lets you do many things, such as sharing a folder, from the command line. In principle you can even create the shared folder remotely. In my case it did not work out (password was refused for some reason) but I could do it 'blindly' from the command line.
Hope it helps!
[grrrr] Sorry, your IP is outside the US
I've always found region locking to be a significant annoyance (ie. you cannot play a console game in Europe if you bought it in the US, and vice versa). But even if I don't like it, I can only recognize that it is an efficient way to force money out of customers (what is a right price anyway?). I just admire the irony of globalized companies putting such measures in place...
However, region locking on Internet - especially for video on demand - defies any sort of logic. It has become a sort of marketing reflex, hurting the very interests it is supposed to be protecting. Exactly like these stupid moves we sometimes do, such as looking at your watch when you're holding a glass of water.
Let me explain. I like many of the latest US shows. I want to reward the people making the show and I am perfectly fine with the idea of paying to watch them online. So, here I am, on a popular VOD website, my credit card number half entered, when suddenly, a doubt strikes me. The sort of thought that you sometimes get, along the line of: 'no way ... that would really be too stupid'. But no, there it is, in the service agreement I too quickly agreed with: "We do not broadcast outside of the US".
Darn.
Where this really gets mindbloggling is that 1) there is no equivalent service in my country 2) most of these shows will never be on TV here anyway 3) I could watch all of them, 'for free', with very little effort. So what the hell is going on? ... go figure ...
(note that even if bullet 3 stops being an option somehow (!!) it becomes even worse: people will never get to discover the show, they'll be even less inclined to buy it on DVD ...).
However, region locking on Internet - especially for video on demand - defies any sort of logic. It has become a sort of marketing reflex, hurting the very interests it is supposed to be protecting. Exactly like these stupid moves we sometimes do, such as looking at your watch when you're holding a glass of water.
Let me explain. I like many of the latest US shows. I want to reward the people making the show and I am perfectly fine with the idea of paying to watch them online. So, here I am, on a popular VOD website, my credit card number half entered, when suddenly, a doubt strikes me. The sort of thought that you sometimes get, along the line of: 'no way ... that would really be too stupid'. But no, there it is, in the service agreement I too quickly agreed with: "We do not broadcast outside of the US".
Darn.
Where this really gets mindbloggling is that 1) there is no equivalent service in my country 2) most of these shows will never be on TV here anyway 3) I could watch all of them, 'for free', with very little effort. So what the hell is going on? ... go figure ...
(note that even if bullet 3 stops being an option somehow (!!) it becomes even worse: people will never get to discover the show, they'll be even less inclined to buy it on DVD ...).
Friday, July 25, 2008
[electronics] PICs
Before I started programming computers, I was always trying to build some eletronic boards doing various stuff. Well, I am saying 'trying' because I never quite managed! Problem was, doing cool stuff quickly required a lot of equipement. Plus, contrary to the computer world, you have to go to a shop in person to buy the parts - and sometimes wait for weeks for them to ship in (no, there was no 'order-it-over-the-internet' at this time ... who said I am getting old?).
Anyway, I never dropped the idea of coming back to electronics one day. I mean, computers are great, but actually building a physical device really is something I find amazing.
Luckily, a new collegue of mine - David Grelaud - turns out to be an electronics guru :) He pointed me out a familly of microcontrollers - PIC's from Microchip - which are in fact fairly easy to use. These little things are programmed in assembler. Code is compiled on the PC and sent to the device through a programmer. You can order a relatively inexpensive programmer, which comes with a demo board, and get started! All tools to program are provided, as well as lessons to learn progressively the assembly language. The programmer is extremely simple to use: Just plug it to your computer USB!!
Ok, but how about the circuit board? Well, this is what is so cool about the PICs. They are extremely easy to use from a hardware point of view. I made a simple demo card with only a few wires, one resistor and a tricolor LED! I can program it from the PC, unplug the programmer and it becomes independent! Here is my - really ugly - card, plugged to the programmer:
Anyway, I never dropped the idea of coming back to electronics one day. I mean, computers are great, but actually building a physical device really is something I find amazing.
Luckily, a new collegue of mine - David Grelaud - turns out to be an electronics guru :) He pointed me out a familly of microcontrollers - PIC's from Microchip - which are in fact fairly easy to use. These little things are programmed in assembler. Code is compiled on the PC and sent to the device through a programmer. You can order a relatively inexpensive programmer, which comes with a demo board, and get started! All tools to program are provided, as well as lessons to learn progressively the assembly language. The programmer is extremely simple to use: Just plug it to your computer USB!!
Ok, but how about the circuit board? Well, this is what is so cool about the PICs. They are extremely easy to use from a hardware point of view. I made a simple demo card with only a few wires, one resistor and a tricolor LED! I can program it from the PC, unplug the programmer and it becomes independent! Here is my - really ugly - card, plugged to the programmer:
There are even C compilers for the PICs (C18, CCS, MikroC, PICC, SDCC). I am using SDCC which is open-source, but expect some not-so-easy install process. I had to hack a little bit because my PIC (18f4580) was not directly supported. But well, nothing too horrible if you are familiar with low level hacking (for those interested, use the 18f4585 template and setup the config bits directly in hexadecimal in the c code). The compiler produces a file containing the raw byte code (a .hex file) that is directly written into the PIC using the programmer. And voila, it just works !!
Amazing - now I am spending hours tweaking my rgb LED :-) (by quickly switching red/green/blue you can produce any color).
My head is just buzzing with cool projects to try on. I expect things will quickly complicate, but I know that the first step is always the most difficult.
Hey, did you know you can even create USB devices with a PIC ???!!?
Monday, June 9, 2008
[research] Lazy Solid Texture Synthesis
Our latest work on texture synthesis from example has been accpeted to EGSR 2008!! Check it out here: http://www-sop.inria.fr/reves/Basilic/2008/DLTD08/.
The key idea is to synthesize solid textures for surfaces, but only for the voxels around the object. Hence we never have to store or compute the entire volume. Our GPU implementation is very fast, so we can in fact synthesize a texture for the interior surfaces whenever an object is cut or broken. We obtain much more variety than a direct tiling of a 3D tile, which would create visible repetitions along some directions (and require storing a full volume tile). There is no pre-process of the object interior (ie. no thetrahedrons, no prior-knowledge of where the object will fracture) so our approach could be used for interactive breaking of large structures.
This is a collaboration with Yue Dong and Xin Tong (from MSRA). The project was very fun to work on, and I hope you'll find it interesting and - most importantly - useful.
I will add some more material on the paper webpage soon.
The key idea is to synthesize solid textures for surfaces, but only for the voxels around the object. Hence we never have to store or compute the entire volume. Our GPU implementation is very fast, so we can in fact synthesize a texture for the interior surfaces whenever an object is cut or broken. We obtain much more variety than a direct tiling of a 3D tile, which would create visible repetitions along some directions (and require storing a full volume tile). There is no pre-process of the object interior (ie. no thetrahedrons, no prior-knowledge of where the object will fracture) so our approach could be used for interactive breaking of large structures.
This is a collaboration with Yue Dong and Xin Tong (from MSRA). The project was very fun to work on, and I hope you'll find it interesting and - most importantly - useful.
I will add some more material on the paper webpage soon.
Saturday, May 17, 2008
[game] ragsmash
I just corrected the 'elastic band' problem in Ragdoll Smasher. This was due to a different handling of timers in XP and Vista.
This is now fixed!
This is now fixed!
Subscribe to:
Posts (Atom)