473,757 Members | 10,007 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Pa rent.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.SaveToFil e, 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 4521
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**********@n tlworld.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.Pa rent.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.SaveToFil e, 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
4125
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 SourceDataLine. currently, it does not play back. andrewjj20 the play method: class Player implements Runnable { public Player() {
0
1529
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. Regards, ajac
1
2145
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 from gear to a logfile. The problem is that gear uses terminal control commands to create a nice commandline interface. I can filter out all non printable characters to get something I can put in my logfile, but this leaves a lot of the terminal...
6
2446
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 anywhere? At one time there was some code available for wizards, is this all hidden now? Thanks!
1
15878
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 that the dll formed is not a valid managed dll. So, I compiled the project as a static library (.lib) and used it in a cpp project. I was able to use it successfully this way. Secondly, I was also unable to find any sound recording library in C#....
2
1164
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
4682
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 getting errors I don't quite understand (I've never done anything like this before)... Any help would be appreciated in getting this to work... '-----------------------------------------------------------------------------
0
1944
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 CREATES AN INSTANCE OF A VOICE RECORDER, but now how do you get it to record, save, play back, etc?
2
2178
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 will let me record sound. Does anyone know of any components or techniques to solve this problem? I would prefer to avoid jumping into Direct X since it will be used in a corporate environment.
0
9489
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
9885
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9737
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8737
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6562
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5172
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3829
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3399
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.