Uploading Recorded Sound to Server (PHP) & Retrieve to play

Hello friends, i want to capture audio from an applet and send that byte array to server where php will be at the server side. I also want to use an combobox in applet to choose the files already uploaded to server for listen purpose.if anyone having related resources or codes please help me....

[http://www.jsresources.org/examples/SimpleAudioRecorder.html]
Modify the AudioSystem.write to write to an OutputStream instead of a file, and then just write it using normal socket procedures.
[http://www.jsresources.org/examples/SimpleAudioPlayer.html]
Modify the AudioInputStream to take in an InputStream instead of a file, and then just use normal socket procedure to download the file from the server.

Similar Messages

  • Can I record sound using a microphone and then upload it to server?

    Hello guys I thank you in advance for reading this. What I want to know is if it is possible to record a sound clip using a microphone and then upload it to the server using a swf applet in a webpage. Im an experienced java/javascript programmer but just starting out with flash/action script. What technologies will I need to do this? Can I do this simply using simply an swf file and an apache/php or jsp page? Again, thanks alot for your help.
    -BeWilled

    You can Microphone class in Flash to record the sound and it will directly upload to FMS server .
    Use the Microphone class to capture audio from a microphone attached to a computer . Use the Microphone class to monitor the audio locally. Use the NetConnection and NetStream classes to transmit the audio to Flash Media Server. Flash Media Server can send the audio to other servers and broadcast it to other clients running Swf files .
    Below link might help you in doing this : http://www.adobe.com/devnet/air/flex/articles/using_mic_api.html

  • Recording sound without Flash Media Server?

    Hello,
    I am totally new to Flash Media Server I need to be able to record sound via a Flash app and save it to a server preferably without the use of a Flash Media Server type setup. There is no requirement for live streaming.
    Is it possible to record the sound and save in memory then pass the data/file as a query parameter to the server?
    I don't even know if I've posted this in the correct place... any help/guidance will be appreciated.
    Thanks.

    Hi,
    You can use any publisher to publish like FMLE and publish the streams to the application in applications folder suppose application name is sampleApp then create a folder in applications folder of FMS root directory and then keep the below mains.asc file which does the recording of published streams to the sampleApp application.
    //main.asc
    application.onConnect=function(clientObj)
    return true;
    application.onPublish = function(clientObj,streamObj){
      trace("in application publish");
      streamObj.record("record");
    application.onUnpublish = function(clientObj,streamObj){
    trace("on unpublish");
    streamObj.record(false);
    I think this should solve your problem.
    Regards,
    Amit

  • Record sound in a browser and save to server

    i need users to be able to record sound from their
    microphones into a browser-based app, which then saves the
    resulting sound file on the server. can FMS do this? are there any
    tutorials or sample files that illustrate this functionality?
    better yet, can this be done without FMS? is there a flash /
    coldfusion / pre-fab app solution that will work without the need
    for FMS?
    thanks!

    Try a Restart. 
    Press and hold the Sleep/Wake button for a few seconds until the red "slide to power off" slider appears, and then slide the slider. Press and hold the Sleep/Wake button until the Apple logo appears.
     Resetting your settings
    You can also try resetting all settings. Settings>General>Reset>Reset All Settings. You will have to enter all of your device settings again.... All of the settings in the settings app will have to be re-entered. You won't lose any data, but it takes time to enter all of the settings again.
    Resetting your device
    Press and hold the Sleep/Wake button and the Home button together for at least ten seconds, until the Apple logo appears. Apple recommends this only if you are unable to restart it.
    Or if this doesn't work and nobody else on the blog doesn't have a better idea you can contact Apple. 
    Here is a link to their contacts with most of the information below. 
    http://www.apple.com/contact/

  • Recording Sound Files

    I'm looking at technologies for an application that will
    (among other things) provide dictation capabilities. Specifically,
    we need to be able to record sound files, review them, then upload
    them to a central server.
    My reading of the documentation is that Flex will not be able
    to record a sound file, and in any case I won't be able to get
    access to the microphone without a confirmation dialog. Is this
    correct?
    I'm guessing that AIR, as a desktop application, would have
    this capability. So as a bonus, if anyone could point me to
    information on that I would appreciate it.

    Open up QuickTime. Go to File->New audio recording. Click on the red button and speak (there's a built in mic) click on the black square when you're done. The file will save to wherever you have the QT preferences set to save to.
    EDIT* Oh I may have led you astray. I think you need QTPro to do that. Well you can capture audio in GarageBand. Just select a New Track and use the Real Instrument setting. Same basic idea. Hit record, speak and then stop.

  • Uploading a file to server using servlet (Without using Jakarta Commons)

    Hi,
    I was trying to upload a file to server using servlet, but i need to do that without the help of anyother API packages like Jakarta Commons Upload. If any class for retrieval is necessary, how can i write my own code to upload from client machine?.
    From
    Velu

    <p>Why put such a restriction on the solution? Whats wrong about using that library?
    The uploading bit is easy - you put a <input type="file"> component on the form, and set it to be method="post" and enctype="multipart/form-data"
    Reading the input stream at the other end - thats harder - which is why they wrote a library for it. </p>
    why i gave the restriction is that, i have a question that <code>'can't we implement the same upload'</code>
    I was with the view that the same can be implemented by our own code right?

  • Can't upload reports to crystal server

    Hello guys,
    First is the system info:
    Crystal Server XI R2 with SP3
    OS: Red Hat Enterprise Linux ES release 4 (Nahant Update 6)
    Database: Oracle DB 10g
    This issue shall be divided into two parts.
    Parts one:
    Before the server is reinstalled we can upload some reports. But there is some limitation. When one report is changed, we can't upload it to the server directly. This report should be renamed to a different name then it can be uploaded. If we don't do so it fails with an error message says 'An unexpected error has occurred'. So every time we need to rename reports and then upload them. This workaround is OK for some reports but not all of them. No matter how we reboot the machine or restart the crystal server.
    Part two:
    One day the machine crashed and we reinstalled the crystal server. But this time it won't accept any report at all. Still it accepts other file such as *.Doc, *.PDF Etc. Every time we try to upload a report and we get an error message says 'An unexpected error has occurred'. If we use CMC to upload a report we get something more detail says 'There was an error while retrieving data from the server: Unknown exception occurred when calling into the plugin'.
    BTW, all reports are tested in report designer. They are 100% OK. All services of the crystal server are up and running.
    And one more thing, how can I attach file in this forum. I want to give dear you the log files to refer to.
    Thanks a lot.

    Hi
    It would be easier if you would keep this all in the same topic.
    As suggested in you other thread ([Can't upload reports to crystal |Can't upload reports to crystal server]), this is very likely to be a permission problem.
    Caroline

  • Can't upload files to lighttp server

    Hi *
    I'm starting to have grey hairs abut this...
    My sys is Archlinux (64bit), lighttpd 1.4.29-2, curl 7.22.
    I'm trying to setup hhtp server with capability of upload files.
    After basic setup I use following command to test functionality: 
    curl -T "test_file" http://192.168.1.254/test/
    curl's output is following:
    [root@mythtv ~]# curl -T "test_file" http://192.168.1.254/test/
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <title>404 - Not Found</title>
    </head>
    <body>
    <h1>404 - Not Found</h1>
    </body>
    </html>
    Dir "test" exists & has 777.
    All dirs upper to "test" also have 777.
    lighttpd access log shows following:
    192.168.1.254 192.168.1.254 - [24/Nov/2011:11:57:14 +0100] "PUT /test/test_file HTTP/1.1" 404 345 "-" "curl/7.22.0 (x86_64-unknown-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.0e zlib/1.2.5 libssh2/1.3.0"
    My lighttpd.conf is following:
    server.modules = (
    "mod_rewrite",
    "mod_access",
    "mod_auth",
    "mod_setenv",
    "mod_fastcgi",
    "mod_cgi",
    "mod_webdav",
    "mod_accesslog" )
    server.document-root = "/var/http/"
    server.errorlog-use-syslog = "enable"
    index-file.names = ( "index.php", "index.html",
    "index.htm", "default.htm" , "mythweb.php" )
    mimetype.assign = (
    ".pdf" => "application/pdf",
    ".sig" => "application/pgp-signature",
    ".spl" => "application/futuresplash",
    ".class" => "application/octet-stream",
    ".ps" => "application/postscript",
    ".torrent" => "application/x-bittorrent",
    ".dvi" => "application/x-dvi",
    ".gz" => "application/x-gzip",
    ".pac" => "application/x-ns-proxy-autoconfig",
    ".swf" => "application/x-shockwave-flash",
    ".tar.gz" => "application/x-tgz",
    ".tgz" => "application/x-tgz",
    ".tar" => "application/x-tar",
    ".zip" => "application/zip",
    ".mp3" => "audio/mpeg",
    ".m3u" => "audio/x-mpegurl",
    ".wma" => "audio/x-ms-wma",
    ".wax" => "audio/x-ms-wax",
    ".ogg" => "application/ogg",
    ".wav" => "audio/x-wav",
    ".gif" => "image/gif",
    ".jar" => "application/x-java-archive",
    ".jpg" => "image/jpeg",
    ".jpeg" => "image/jpeg",
    ".png" => "image/png",
    ".xbm" => "image/x-xbitmap",
    ".xpm" => "image/x-xpixmap",
    ".xwd" => "image/x-xwindowdump",
    ".css" => "text/css",
    ".html" => "text/html",
    ".htm" => "text/html",
    ".js" => "text/javascript",
    ".asc" => "text/plain",
    ".c" => "text/plain",
    ".cpp" => "text/plain",
    ".log" => "text/plain",
    ".conf" => "text/plain",
    ".text" => "text/plain",
    ".txt" => "text/plain",
    ".dtd" => "text/xml",
    ".xml" => "text/xml",
    ".mpeg" => "video/mpeg",
    ".mpg" => "video/mpeg",
    ".mov" => "video/quicktime",
    ".qt" => "video/quicktime",
    ".avi" => "video/x-msvideo",
    ".asf" => "video/x-ms-asf",
    ".asx" => "video/x-ms-asf",
    ".wmv" => "video/x-ms-wmv",
    ".bz2" => "application/x-bzip",
    ".tbz" => "application/x-bzip-compressed-tar",
    ".tar.bz2" => "application/x-bzip-compressed-tar", # default mime type
    "" => "application/octet-stream",
    debug.log-request-handling = "enable"
    accesslog.filename = "/var/log/web-access.log"
    url.access-deny = ( "~", ".inc" )
    $HTTP["url"] =~ "\.pdf$" {
    server.range-requests = "disable"
    static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
    server.pid-file = "/var/run/lighttpd.pid"
    server.reject-expect-100-with-417 = "disable"
    fastcgi.server = (
    ".php" => ((
    "bin-path" => "/usr/bin/php-cgi",
    "socket" => "/var/run/mythtv-php-fcgi.socket",
    "broken-scriptfilename" => "enable",
    "bin-environment" => (
    "db_server" => "localhost",
    "db_name" => "mythconverg",
    "db_login" => "mythtv",
    "db_password" => "mythtv"
    setenv.add-environment = (
    "db_server" => "localhost",
    "db_name" => "mythconverg",
    "db_login" => "mythtv",
    "db_password" => "mythtv"
    cgi.assign = ( ".pl" => "/usr/bin/perl",
    ".cgi" => "/usr/bin/perl" )
    url.rewrite-once = (
    "^/{1,2}mythweb/(css|data|images|js|themes|skins|[a-z_]+\.(php|pl)).*" => "$0",
    "^/{1,2}mythweb/(pl(/.*)?)$" => "/mythweb/mythweb.pl/$1",
    "^/{1,2}mythweb/(.+)$" => "/mythweb/mythweb.php/$1",
    "^/{1,2}mythweb/(.*)$" => "/mythweb/mythweb.php"
    include "/etc/lighttpd/auth-inc.conf"
    Can somebody hint me where issue might be ?
    Thx n advance !

    @milomir,
    Thx for replay.
    While Your proposal is nice solution - this little now what I want to achieve.
    In my application curl usage is automated (curl is called by user script).
    My script has following entry:
    /usr/local/bin/curl -s -f -T "<file>" "<server>/<path>/<file>"
    Strange enough that I have setup which worked OK sometime ago.
    Since that time I do few system upgrades - and recently I discover that posting files via curl isn't working.
    Last days I was trying many combination including clean install of 64bit arch in VM and try to play with default settings.
    No matter what I'm doing - all the time I'm getting 404.
    I still think I miss something in configuration as i don't believe vanilla Arch/Lighttpd/Curl can't be used as http upload service with standard curt usage (like way it is used in my script).
    So maybe my original Q should be following: why I can't upload files with standard curl/wget usage ?
    -br

  • Transporting General ledger master record to QA server-urgent

    Dear all,
    Can anyone say how to transport General ledger master record to QA server?
    I will award good points.
    Thanks in advance.
    Regards,
    Ar

    Hi
    Using TCODE : BD18
    Use the Message type GLCORE / GLMAST to upload
    you can transport the GL master data - - - this is through the ALE set up. ABAPer has to set up the ALE set up
    As a testing part before setting up the client you just try this in the sending server you will get created with IDoc for the above Messge type
    VVR

  • I would like to allow users to upload pictures to my server

    hello;
    I would like for users to be able to upload jpgs from a HTML
    interface;
    the pictures will then be available to be dynamically loaded
    into the website;
    PROBLEM 1 : can a HTML webpage access a user's computer to
    get the picture?
    PROBLEM 2 : how to upload it to the server? Javascript does
    not have access to the server, PHP does not have access to the
    webpage;
    PROBLEM 3 : checking for filetypes of pictures;
    any thoughts?
    thanks
    dsdsdsdsd

    dsdsdsdsd wrote:
    > David, thank you very much; I was not expecting that
    HTML would have a
    > form.input type that would do this;
    It's even available with a single click in Dreamweaver. Just
    select File
    Field from the Forms category of the Insert bar. It's
    completely
    cross-browser, and automatically generates the Browser
    button.
    > would you please check your "PHP Solutions" link; I
    would like to read it but
    > I am getting an Error 404;
    The link is fine. I had a temporary problem logging onto my
    mail account
    a little earlier, so it's possible that the server might have
    been down
    for a short while.
    > but might you tell me in a nutshell about the security
    issue? seems to me that
    > the PHP developer does not need to be concerned about
    security, but instead
    > only the innocent websurfer needs to be concerned about
    the security of their
    > pc's directory structure;
    There is absolutely nothing for the innocent websurfer to
    worry about,
    and everything for the PHP developer to guard against. The
    form is
    entirely under the control of the user. The browse facility
    simply lets
    the user select the file to be uploaded.
    You, as the PHP developer, on the other hand, need to make
    sure that
    what's being uploaded doesn't exceed a maximum size, that
    it's of an
    acceptable MIME type, that it doesn't contain a script that
    attempts to
    probe the file system on your server, and that it doesn't
    contain
    offensive or illegal material. Letting unknown people upload
    files to
    your server makes you vulnerable to a whole slew of malicious
    attacks.
    You probably cannot eliminate all potential problems
    (particularly
    regarding obscene or illegal material), but you can take a
    lot of
    precautions to minimize your risk.
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Can't play / record sound on Yosemite with external Firewire audio interface

    I've got a Focusrite Saffire PRO 24 Firewire audio device. It worked perfectly until I upgraded to Yosemite. Even upgrading the driver to the last version (which suports Yosemite) I can't play sound in any way. Garageband crashes when I try to play my projects. Youtube videos on a browser stay paused on 00:00...
    Saffire pro 24 is detected. I can select it on System preferences or garageband settings. On Saffire Mix Control 3.5 I can see how audio inputs are ok, the input signal is received and the output is ok. According to Saffire Mix Control everything's fine, but I can't play audio nor record sound.
    If I switch to internal audio device everything works perfectly.
    I did some research and every time I try to play sound these errors are shown on the Console.
    11/12/14 21:06:52,045 AirPlayUIAgent[466]: 2014-12-11 09:06:52.045250 PM [AirPlayAVSys] ### Audio server died
    11/12/14 21:06:52,046 discoveryd[51]: AwdlD2d AwdlD2dStopBrowsingForKey: '_raop' Browsing service stopped
    11/12/14 21:06:52,047 discoveryd[51]: AwdlD2d AwdlD2dStopBrowsingForKey: '_airplay' Browsing service stopped
    11/12/14 21:06:52,050 com.apple.xpc.launchd[1]: (com.apple.audio.coreaudiod[1044]) Service exited due to signal: Segmentation fault: 11
    11/12/14 21:06:52,129 com.apple.audio.DriverHelper[1088]: The plug-in named AirPlay.driver requires extending the sandbox for the IOKit user-client class AMDRadeonX4000_AMDAccelDevice.
    11/12/14 21:06:52,130 com.apple.audio.DriverHelper[1088]: The plug-in named AirPlay.driver requires extending the sandbox for the IOKit user-client class AMDRadeonX4000_AMDAccelSharedUserClient.
    11/12/14 21:06:52,130 com.apple.audio.DriverHelper[1088]: The plug-in named AirPlay.driver requires extending the sandbox for the IOKit user-client class AMDSIVideoContext.
    11/12/14 21:06:52,130 com.apple.audio.DriverHelper[1088]: The plug-in named AirPlay.driver requires extending the sandbox for the IOKit user-client class Gen6DVDContext.
    11/12/14 21:06:52,130 com.apple.audio.DriverHelper[1088]: The plug-in named AirPlay.driver requires extending the sandbox for the IOKit user-client class IGAccelDevice.
    11/12/14 21:06:52,130 com.apple.audio.DriverHelper[1088]: The plug-in named AirPlay.driver requires extending the sandbox for the IOKit user-client class IGAccelSharedUserClient.
    11/12/14 21:06:52,130 com.apple.audio.DriverHelper[1088]: The plug-in named AirPlay.driver requires extending the sandbox for the IOKit user-client class IGAccelVideoContextMain.
    11/12/14 21:06:52,131 com.apple.audio.DriverHelper[1088]: The plug-in named AirPlay.driver requires extending the sandbox for the IOKit user-client class IGAccelVideoContextMedia.
    11/12/14 21:06:52,131 com.apple.audio.DriverHelper[1088]: The plug-in named AirPlay.driver requires extending the sandbox for the IOKit user-client class IGAccelVideoContextVEBox.
    11/12/14 21:06:52,131 com.apple.audio.DriverHelper[1088]: The plug-in named AirPlay.driver requires extending the sandbox for the IOKit user-client class IOBluetoothDeviceUserClient.
    11/12/14 21:06:52,131 com.apple.audio.DriverHelper[1088]: The plug-in named AirPlay.driver requires extending the sandbox for the IOKit user-client class IOHIDParamUserClient.
    11/12/14 21:06:52,131 com.apple.audio.DriverHelper[1088]: The plug-in named AirPlay.driver requires extending the sandbox for the IOKit user-client class IOSurfaceRootUserClient.
    11/12/14 21:06:52,132 com.apple.audio.DriverHelper[1088]: The plug-in named AirPlay.driver requires extending the sandbox for the mach service named com.apple.AirPlayXPCHelper.
    11/12/14 21:06:52,132 com.apple.audio.DriverHelper[1088]: The plug-in named AirPlay.driver requires extending the sandbox for the mach service named com.apple.wirelessproxd.
    11/12/14 21:06:52,146 coreaudiod[1087]: 2014-12-11 09:06:52.145826 PM [AirPlay] BTLE discovery removing all devices
    11/12/14 21:06:52,147 coreaudiod[1087]: 2014-12-11 09:06:52.146660 PM [AirPlay] Resetting AWDL traffic registration.
    11/12/14 21:06:52,147 coreaudiod[1087]: 2014-12-11 09:06:52.146988 PM [AirPlay] Deregister AirPlay traffic for AWDL at MAC 00:00:00:00:00:00 with target infra non critical PeerIndication=0 err=-3900
    11/12/14 21:06:52,149 discoveryd[51]: AwdlD2d AwdlD2dStartBrowsingForKey: '_raop' Browsing service started
    11/12/14 21:06:52,149 discoveryd[51]: AwdlD2d AwdlD2dStartBrowsingForKey: '_airplay' Browsing service started
    11/12/14 21:06:52,150 com.apple.audio.DriverHelper[1088]: The plug-in named BluetoothAudioPlugIn.driver requires extending the sandbox for the IOKit user-client class IOBluetoothDeviceUserClient.
    11/12/14 21:06:52,150 com.apple.audio.DriverHelper[1088]: The plug-in named BluetoothAudioPlugIn.driver requires extending the sandbox for the mach service named com.apple.blued.
    11/12/14 21:06:52,150 com.apple.audio.DriverHelper[1088]: The plug-in named BluetoothAudioPlugIn.driver requires extending the sandbox for the mach service named com.apple.bluetoothaudiod.
    11/12/14 21:06:52,153 coreaudiod[1087]: Logging disabled
    11/12/14 21:06:52,170 coreaudiod[1087]: 2014-12-11 09:06:52.170272 PM [AirPlay] AirPlay: Performing audio format change for 4 (AP Out) to PCM/44100/16/2 for output and  for input
    11/12/14 21:06:52,170 coreaudiod[1087]: 2014-12-11 09:06:52.170473 PM [AirPlay] AirPlay: Performing audio format change for 4 (AP Out) to PCM/44100/16/2 for output and  for input
    11/12/14 21:06:52,398 bluetoothaudiod[1089]: Logging disabled
    It looks like there's some problem with Airplay? I didn't even know what Airplay was until now but after looking for some information I don't understand what has Airplay to do with playing sound over firewire.
    I tried to disable Airplay on System Preferences > Display. I removed com.apple.airplay.plist from Library/Preferences but the results are the same
    Please a need help with this. It's getting really frustrating. I'm trying to get help from Focusrite support as well.

    In case another poor man like me run into this issue, here's how I solved it:
    First of all, I removed Saffire Mix Control entirely following this guide:
    http://global.focusrite.com/answerbase/how-do-i-remove-saffire-mixcontrol-from-m y-mac
    In addition to that I did this:
    1. Mac HD > Library > Preferences > Audio and in there please delete the two preference files
    2. Finder > Go > Hold down the "Alt" key and click on the library folder. In there please trash the file "com.apple.audiomidisetup.plist" (in case it exists)
    Then I emptied the trash, restarted system and reinstalled Saffire Mix Control 3.5
    Problem solved.

  • Flash: Recording Sound

    I created a thing that records sound. The problem is that it wont save what I recorded.It saves as nothing.
    Here is the code I used:
    import org.bytearray.micrecorder.encoder.WaveEncoder;
    import org.bytearray.micrecorder.events.RecordingEvent;
    import org.bytearray.micrecorder.MicRecorder;
    import flash.net.FileReference;
    var volumes:Number = .5;
    var wavEncoder:WaveEncoder = new WaveEncoder(volumes);
    var recorder:MicRecorder = new MicRecorder(wavEncoder)
    var file:FileReference = new FileReference();
    var recordSoundBTN:MovieClip = new RecordSound();
    addChild(recordSoundBTN)
        recordSoundBTN.x = 55.3
        recordSoundBTN.y = 344.35
    recordSoundBTN.addEventListener(MouseEvent.CLICK, recordSt)
    recorder.addEventListener(RecordingEvent.RECORDING, onRecording);
    recorder.addEventListener(Event.COMPLETE, onRecordComplete);
    function recordSt(Event:MouseEvent):void
        recorder.record();
        trace('recorded')
        recordSoundBTN.removeEventListener(MouseEvent.CLICK, recordSt)
        recordSoundBTN.addEventListener(MouseEvent.CLICK, recordSp)
        recordSoundBTN.gotoAndStop(2)
    function onRecording(Event:RecordingEvent):void
        var eventTime:Number = Event.time
        timeText.text = eventTime.toString()
        trace('1' + ' ' + eventTime)
    function recordSp(Event:MouseEvent):void
        recorder.stop();
        trace('stoped')
        recordSoundBTN.removeEventListener(MouseEvent.CLICK, recordSp)
        recordSoundBTN.addEventListener(MouseEvent.CLICK, recordSt)
        recordSoundBTN.gotoAndStop(1)
    function onRecordComplete(event:Event):void
         file.save(recorder.output,"FlashSound.wav");
    Here is the code for WaveEncoder:
    package org.bytearray.micrecorder.encoder
        import flash.events.Event;
        import flash.utils.ByteArray;
        import flash.utils.Endian;
        import org.bytearray.micrecorder.IEncoder;
        public class WaveEncoder implements IEncoder
            private static const RIFF:String = "RIFF";   
            private static const WAVE:String = "WAVE";   
            private static const FMT:String = "fmt ";   
            private static const DATA:String = "data";   
            private var _bytes:ByteArray = new ByteArray();
            private var _buffer:ByteArray = new ByteArray();
            private var _volume:Number;
             * @param volume
            public function WaveEncoder( volume:Number=1 )
                _volume = volume;
             * @param samples
             * @param channels
             * @param bits
             * @param rate
             * @return
            public function encode( samples:ByteArray, channels:int=2, bits:int=16, rate:int=44100 ):ByteArray
                var data:ByteArray = create( samples );
                _bytes.length = 0;
                _bytes.endian = Endian.LITTLE_ENDIAN;
                _bytes.writeUTFBytes( WaveEncoder.RIFF );
                _bytes.writeInt( uint( data.length + 44 ) );
                _bytes.writeUTFBytes( WaveEncoder.WAVE );
                _bytes.writeUTFBytes( WaveEncoder.FMT );
                _bytes.writeInt( uint( 16 ) );
                _bytes.writeShort( uint( 1 ) );
                _bytes.writeShort( channels );
                _bytes.writeInt( rate );
                _bytes.writeInt( uint( rate * channels * ( bits >> 3 ) ) );
                _bytes.writeShort( uint( channels * ( bits >> 3 ) ) );
                _bytes.writeShort( bits );
                _bytes.writeUTFBytes( WaveEncoder.DATA );
                _bytes.writeInt( data.length );
                _bytes.writeBytes( data );
                _bytes.position = 0;
                return _bytes;
            private function create( bytes:ByteArray ):ByteArray
                _buffer.endian = Endian.LITTLE_ENDIAN;
                _buffer.length = 0;
                bytes.position = 0;
                while( bytes.bytesAvailable )
                    _buffer.writeShort( bytes.readFloat() * (0x7fff * _volume) );
                return _buffer;
    Here is the code for RecordingEvent:
    package org.bytearray.micrecorder.events
        import flash.events.Event;
        public final class RecordingEvent extends Event
            public static const RECORDING:String = "recording";
            private var _time:Number;
             * @param type
             * @param time
            public function RecordingEvent(type:String, time:Number)
                super(type, false, false);
                _time = time;
             * @return
            public function get time():Number
                return _time;
             * @param value
            public function set time(value:Number):void
                _time = value;
             * @return
            public override function clone(): Event
                return new RecordingEvent(type, _time)
    Here is the code for MicRecorder
    package org.bytearray.micrecorder
        import flash.events.Event;
        import flash.events.EventDispatcher;
        import flash.events.SampleDataEvent;
        import flash.events.StatusEvent;
        import flash.media.Microphone;
        import flash.utils.ByteArray;
        import flash.utils.getTimer;
        import org.bytearray.micrecorder.encoder.WaveEncoder;
        import org.bytearray.micrecorder.events.RecordingEvent;
         * Dispatched during the recording of the audio stream coming from the microphone.
         * @eventType org.bytearray.micrecorder.RecordingEvent.RECORDING
         * * @example
         * This example shows how to listen for such an event :
         * <div class="listing">
         * <pre>
         * recorder.addEventListener ( RecordingEvent.RECORDING, onRecording );
         * </pre>
         * </div>
        [Event(name='recording', type='org.bytearray.micrecorder.RecordingEvent')]
         * Dispatched when the creation of the output file is done.
         * @eventType flash.events.Event.COMPLETE
         * @example
         * This example shows how to listen for such an event :
         * <div class="listing">
         * <pre>
         * recorder.addEventListener ( Event.COMPLETE, onRecordComplete );
         * </pre>
         * </div>
        [Event(name='complete', type='flash.events.Event')]
         * This tiny helper class allows you to quickly record the audio stream coming from the Microphone and save this as a physical file.
         * A WavEncoder is bundled to save the audio stream as a WAV file
         * @author Thibault Imbert - bytearray.org
         * @version 1.2
        public final class MicRecorder extends EventDispatcher
            private var _gain:uint;
            private var _rate:uint;
            private var _silenceLevel:uint;
            private var _timeOut:uint;
            private var _difference:uint;
            private var _microphone:Microphone;
            private var _buffer:ByteArray = new ByteArray();
            private var _output:ByteArray;
            private var _encoder:IEncoder;
            private var _completeEvent:Event = new Event ( Event.COMPLETE );
            private var _recordingEvent:RecordingEvent = new RecordingEvent( RecordingEvent.RECORDING, 0 );
             * @param encoder The audio encoder to use
             * @param microphone The microphone device to use
             * @param gain The gain
             * @param rate Audio rate
             * @param silenceLevel The silence level
             * @param timeOut The timeout
            public function MicRecorder(encoder:IEncoder, microphone:Microphone=null, gain:uint=100, rate:uint=44, silenceLevel:uint=0, timeOut:uint=4000)
                _encoder = encoder;
                _microphone = microphone;
                _gain = gain;
                _rate = rate;
                _silenceLevel = silenceLevel;
                _timeOut = timeOut;
             * Starts recording from the default or specified microphone.
             * The first time the record() method is called the settings manager may pop-up to request access to the Microphone.
            public function record():void
                if ( _microphone == null )
                    _microphone = Microphone.getMicrophone();
                _difference = getTimer();
                _microphone.setSilenceLevel(_silenceLevel, _timeOut);
                _microphone.gain = _gain;
                _microphone.rate = _rate;
                _buffer.length = 0;
                _microphone.addEventListener(SampleDataEvent.SAMPLE_DATA, onSampleData);
                _microphone.addEventListener(StatusEvent.STATUS, onStatus);
            private function onStatus(event:StatusEvent):void
                _difference = getTimer();
             * Dispatched during the recording.
             * @param event
            private function onSampleData(event:SampleDataEvent):void
                _recordingEvent.time = getTimer() - _difference;
                dispatchEvent( _recordingEvent );
                while(event.data.bytesAvailable > 0)
                    _buffer.writeFloat(event.data.readFloat());
             * Stop recording the audio stream and automatically starts the packaging of the output file.
            public function stop():void
                _microphone.removeEventListener(SampleDataEvent.SAMPLE_DATA, onSampleData);
                _buffer.position = 0;
                _output = _encoder.encode(_buffer, 1);
                dispatchEvent( _completeEvent );
             * @return
            public function get gain():uint
                return _gain;
             * @param value
            public function set gain(value:uint):void
                _gain = value;
             * @return
            public function get rate():uint
                return _rate;
             * @param value
            public function set rate(value:uint):void
                _rate = value;
             * @return
            public function get silenceLevel():uint
                return _silenceLevel;
             * @param value
            public function set silenceLevel(value:uint):void
                _silenceLevel = value;
             * @return
            public function get microphone():Microphone
                return _microphone;
             * @param value
            public function set microphone(value:Microphone):void
                _microphone = value;
             * @return
            public function get output():ByteArray
                return _output;
             * @return
            public override function toString():String
                return "[MicRecorder gain=" + _gain + " rate=" + _rate + " silenceLevel=" + _silenceLevel + " timeOut=" + _timeOut + " microphone:" + _microphone + "]";
    I got the AS file from http://www.bytearray.org/?p=1858

    Hi Lumenphon,
    Thanks for your reply. Can you suggest me some more
    information on this.. like, what are needs to achieve this and how
    to store them to any server (I assume this needs Flash Comm.
    server!). Any online articles/examples also can be very helpful.
    Thnks,
    ASB

  • Uploading images for a mySQL / PHP database

    Hopefully this can be done - I'm working on a site that uses
    a simple mySQL database, where the records include an image.
    I have the form to add records, including the field
    containing the file name - but is it also possible to upload the
    actual file using the same form to their folder, or does that need
    to be done separately using FTP software?
    The idea is for my client to be able to as easily as possible
    add / delete / edit records himself, so clearly getting the actual
    images uploaded at the same point he adds records to the database
    would be great if that's possible.
    Cheers,
    Iain

    The PHP.NET site really covers it in considerable detail.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "David Powers" <[email protected]> wrote in message
    news:ejo4qf$ee3$[email protected]..
    > Iain71 wrote:
    >> Cheers for that - not sure exactly what I need to do
    tho'
    >
    > I'm sure there are plenty of online tutorials if you
    Google for them. I
    > also cover file uploads in my new book, PHP Solutions.
    It's not
    > particularly difficult, but there are quite a few steps,
    and you need to
    > be aware of security considerations.
    >
    > --
    > David Powers
    > Adobe Community Expert
    > Author, "Foundation PHP for Dreamweaver 8" (friends of
    ED)
    >
    http://foundationphp.com/

  • Recording sound in as3...

    Hi All...
         Can any one tell me please, How to record sound for mobile devices and save those recoded files in local system in mp3 format using as3 and air?

    Hi bhargavi,
    I'm not sure if you can save sound files to the local system even with AIR.
    Some time ago I made a similar application, just for test, but I had to send the bytes to a server in order to be recorded. The idea at the time was to use a TTS system.
    I used this page to guide me:
    http://www.bytearray.org/?p=1858
    After googling a bit, I found this one with an example... this is probably what you want:
    http://www.addictivetips.com/windows-tips/microphone-free-adobe-air-mp3-audio-sound-record er/
    See if it works.
    Cheers

  • YouTube Flagged Needle on a Record Sound - Request for Licence Details

    Hi
    I used the 'needle on the record' sound byte to add to a YouTube video
    YouTube has flagged this audio for licencing... anyone got the specifics on whether I can use 'any' of the sound effects to make video for use on YouTube please
    Here's the link - sound effect is at 0:04 seconds
    http://www.youtube.com/watch?feature=player_embedded&v=MqTFmQcbnZE
    I'm certain that the reason Apple included the sound effectds was so legal owners of Final Cut Pro X could use them in video creation so... how do I prove that to YouTube please ?
    Thanks in advance
    Phil

    It is not difficult to dispute with YouTube. While you dispute, they will not put ads on your material. Usually it will be resolved in your favor within 2 weeks or so.
    Here are the steps.
    To dispute the claim with YouTube, sign into YouTube.
    Click on Video Manager (to see my videos that I have uploaded.)
    Click on the Copyright notices link.
    I see a link under the thumbnails which says "matched third party content". Click on this link.
    Click on the link that says"I believe that this copyright claim is not valid."
    Check the box that says I have a license or written permission from the proper rights holder.
    Click continue.
    You may get a box that enables you to explain. State that "I am licensed by Apple, Inc. to use "track name here" which is provided in the Final Cut Pro X App from Apple, Inc." Put a link to the Apple license.
    http://images.apple.com/legal/sla/docs/FinalCutPro.pdf

Maybe you are looking for