By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,353 Members | 1,529 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,353 IT Pros & Developers. It's quick & easy.

Giving commands to Sound Recorder in OLE

P: n/a
Hoping for some advice:
I would like to write some code that controls
the "window's sound recorder" that I embedded in my
program with OLE. I can do this with Excel
(OLE1.Object.Parent.Activecell.Formula = "Hi") because I
know the commands from VBA in Excel.
Is there a way to do this with Windows Sound Recorder?
Some line of code that would, for example, allow me to
change the sample rate so that the user could record
sounds at 8000 samples per second (instead of the default
22.5 KHz) without having to know to navigate the menu
system and change that manually each time?
By the way, if you know of a different way to do this
(change the program's default settings before embedding
it, etc) that would be great, but if there is a way to
talk directly to Sound Recorder I'd like to know how to do
that.

The project I'm working on involves having the user record
themselves speaking a word and then display all sorts of
info about the sound wave they produced. Its as part of a
class on voice recognition. I've already had to weasel my
way into getting to the binary data for the wav file that
the user records (OLE1.SaveToFile, then take that *.ole
file it creates and pull out the part of it that contains
the wav data) but it would be nice to be able to save the
data as an actual wave file, or, even better, just access
what the OLE object is storing in memory without having to
save.

Thanks in advance
Jon
Nov 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Perhaps you should look at the WaveIn* API commands, then you can do wave
recording and memory storing and what not yourself :) I'm sorry, I don't
have a link but a quick search on Google should do the trick.

--
Happy to help,
-- Tom Spink
(th**********@ntlworld.com)

" There's no place like 127.0.0.1 "

Please respond to the newsgroup,
so all can benefit.
One Day,
"Jon Lehrer" <jo*************@yale.edu> wrote in message
news:89****************************@phx.gbl...
Hoping for some advice:
I would like to write some code that controls
the "window's sound recorder" that I embedded in my
program with OLE. I can do this with Excel
(OLE1.Object.Parent.Activecell.Formula = "Hi") because I
know the commands from VBA in Excel.
Is there a way to do this with Windows Sound Recorder?
Some line of code that would, for example, allow me to
change the sample rate so that the user could record
sounds at 8000 samples per second (instead of the default
22.5 KHz) without having to know to navigate the menu
system and change that manually each time?
By the way, if you know of a different way to do this
(change the program's default settings before embedding
it, etc) that would be great, but if there is a way to
talk directly to Sound Recorder I'd like to know how to do
that.

The project I'm working on involves having the user record
themselves speaking a word and then display all sorts of
info about the sound wave they produced. Its as part of a
class on voice recognition. I've already had to weasel my
way into getting to the binary data for the wav file that
the user records (OLE1.SaveToFile, then take that *.ole
file it creates and pull out the part of it that contains
the wav data) but it would be nice to be able to save the
data as an actual wave file, or, even better, just access
what the OLE object is storing in memory without having to
save.

Thanks in advance
Jon

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.