473,385 Members | 1,564 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Giving commands to Sound Recorder in OLE

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
1 4508
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Josh | last post by:
I am having a problem with sound in my program, it takes information from a TargetDataLine, put's it in a temporary file, then takes it back out of the temporary file and plays it using a...
0
by: ajac | last post by:
In the windows xp system the sound recording system give us only 1 minute of recording time. I would like to get the "recording time Length " to the maximum. please let me know Urgently. ...
1
by: Adriaan Renting | last post by:
I have the problem that I need to interact with a CD/DVD burning program called gear. I do this by running it in a pseudo terminal. I also need to log what I'm doing, so I copy all output I get...
6
by: Dave Boyd | last post by:
Are there arguments for the built-in commands called via RunCommand such as acCmdNewObjectReport or do they always require interactive input? Is the code behind the built-in commands exposed...
1
by: Nikhil Aggarwal | last post by:
I have to make an mp3 sound recorder to record through mike. So, I plan to use lame as mp3 encoder which is written in C. I am unable to import its dll in C# project as a reference because it says...
2
by: Ehsan Sadeghi | last post by:
Hello can someone tell me how to save sound files and how to use them in a program.
5
by: Mad Scientist Jr | last post by:
I'm trying to record a voice memo on a Pocket PC (2000) from VB.NET (smart device application from vs.net 2003). Tom Shelton did an initial conversion to VB.NET which I am trying to run, but am...
0
by: Emma Gumbdough | last post by:
Okay we have here a VB.NET version of the .net compact framework voice recorder sample that uses open net CF c# version at: http://www.opennetcf.org/forums/topic.asp?TOPIC_ID=79 THIS CODE...
2
by: Dave A | last post by:
Hi, I need to write a small WinForms application to record some sound in WAV and then integrate with another online application. I cannot find either a MS component or 3rd party component that...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.