473,624 Members | 2,213 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do i record audio from microphone to my local file system

1 New Member
Hi All,


I need to record audio captured from microphone to the local file system .Is it possible? I am trying to use NetConnect() to connect to local file system.
But its throwing error.

I am attaching my code below.


package
{
import flash.display.S prite;
import flash.events.*;
import flash.media.Mic rophone;
import flash.system.Se curity;
import flash.system.Se curityPanel;
import flash.net.*;

public class MicrophoneExamp le extends Sprite
{
public function MicrophoneExamp le()
{
var nc:NetConnectio n = new NetConnection() ;

var stream:NetStrea m = new NetStream(nc);

var mic:Microphone = Microphone.getM icrophone();


Security.showSe ttings(Security Panel.MICROPHON E);
mic.setLoopBack (true);

if (mic != null) {
stream.attachAu dio(mic);
stream.publish( "abc.mp3", "record");

mic.setUseEchoS uppression(true );
mic.addEventLis tener(ActivityE vent.ACTIVITY, activityHandler );
mic.addEventLis tener(StatusEve nt.STATUS, statusHandler);
}
}

private function activityHandler (event:Activity Event):void {
trace("activity Handler: " + event);
}

private function statusHandler(e vent:StatusEven t):void {
trace("statusHa ndler: " + event);
}
}
}


Regards,
Roopal
Dec 17 '07 #1
0 4903

Sign in to post your reply or Sign up for a free account.

Similar topics

6
5541
by: Sugapablo | last post by:
I had an idea for something that I can't find any evidence if it exists, or if it can be done. I assume it can be done. What I'd like to be able to do, is to allow people who come to my website, click a button on the page to begin submitting an audio stream to the server. Basically, once the "record" button was hit by the client, an audio stream would be generated by the client's microphone and would be sent over port 80 (just like...
1
10388
by: Ashish | last post by:
I wanted to make a Java application which would dial a telephone number using the modem. When the person on the other end lifts up the telephone (answers the phone), the application should start playing an audio file(eg. .wav file). The approach I took was using the Java Communications API(javax.comm.). As my modem is connected to the serial port on my computer I send AT commands to make the phone call (ATDT2222222). This is working...
1
5517
by: Michael | last post by:
Hi, This might seem a dumb question, but every search I've done so far has come up blank - with the possible exception of Schtoom. I've seen Schtoom that does manage to capture audio under Mac OS X, but it's unclear whether the audio tools it uses can be used independently of Schtoom. So my question this: does anyone know of a library or simple approach to capturing audio (any quality :) from a microphone on Mac OS X ?
3
6309
by: skt | last post by:
Hi Can anyone tell me how I can stream audio input from a microphone input in C/C++? I would prefer plain C/C++, rather than DirectX/Windows programming, though those would be fine too. Also, how can i read/write wav files using file handles? Thanks a lot Srikanth
2
2755
by: Pan Xingzhi | last post by:
Guys: Hi there. Recently I'll have to write a quite interesting program in Python on a Linux box. What I need is a function which allows the user to 'switch' the audio output from <an audio file>/<microphone>/<line in>. I'm not quite familiar with Linux programming. I've checked some python media frameworks but still need some light. Does anybody have experience on this? Thanks in advance!
2
7860
by: positivebalance41m | last post by:
I have been searching how to do sound capture (record audio input) in VB.NET for days now. I find some references to "winmm.dll" calls, but they give VB5 or VB6 examples which won't code convert upgrade to VB.NET without warnings errors that I can understand how to fix. There's some ActiveX and OCX's floating around, some free some not, but in all cases they don't explain or give me access to the raw PCM data in some kind of familiar...
1
11039
by: David S. Zuza | last post by:
Hi, I am an intermediate vb developer but I am an infant to DirectX programming, I want to develop a spectrum analyzer for audio whether it be from microphone or audio file...but there doesn't seem to be a good resource on where to begin...can anyone provide thanx in advance, David S. Zuza
0
1406
by: =?Utf-8?B?SG5hMTIyNA==?= | last post by:
I am using Window's Vista and am trying to use speech recognition. I have an audio file of an interview (only one person talking, and quite clearly) but I want to use Speech Recognition to turn it into a Word or Wordpad document. Does anyone know the right way to do this? When I speak into the microphone, it picks up all of my words clearly, but when I play the audio file into the microphone, the computer doesn't recognize a single word,...
0
8238
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...
0
8624
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8336
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
8478
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
7164
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...
1
6111
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4082
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
4176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1786
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.