Send wav files over a network

Hi folks,
I need to send sound files over a network. The files I'm wanting to send are wav files. I kinda have the mechanism that sends a file, but I am not sure how to convert wav files into something that I can easily send. Do I need to convert them into bytes, serialize them...etc I don't know.
Can anyone please point me in the right direction? An example would be very much appreciated.
Thank you,
E

hi
this is very simple
convert voice to bytearray
just create one server socket and client socket then connect a sockets and transmit
download sample from
http://javasolution.blogspot.com/2007/04/voice-chat-using-java.html

Similar Messages

  • Streaming .wav file over network

    Hi ,
    I am trying to stream a .wav file over the network using datagram sockets and packets. When it gets to the other end it is just noise but you cannot make out what the music is.
    Any ideas would be most appreciated!
    code below
    byte[] data;
    int bytesAvailable;
              String     strFilename = "test.wav";
              File     soundFile = new File(strFilename);
              AudioInputStream     audioInputStream = null;
              try
                   audioInputStream = AudioSystem.getAudioInputStream(soundFile);
              catch (Exception e)
                   e.printStackTrace();
                   System.exit(1);
    while (thread != null) {
              int     nBytesRead = 0;
              byte[]     abData = new byte[EXTERNAL_BUFFER_SIZE];
              while (nBytesRead != -1)
                   try
                        nBytesRead = audioInputStream.read(abData, 0, abData.length);
                   catch (IOException e)
                        e.printStackTrace();
                   if (nBytesRead >= 0)
    try {
    connection.send(new DatagramPacket(abData,1000));
    }catch(Exception exec) {
    System.out.println("Record: Exception sending packet:\n"+exec.getMessage());
    try {
    thread.sleep(50);
    }catch(InterruptedException exec) {}
    }

    Streaming? looks like your dumping the whole file into a datagram packet. How are you receiving it on the other end?

  • Relinking files over a network

    This is more of an After Effects issue but I thought someone here might be able to help me or point me in the right direction.
    I have a project that was created entirely with still images (almost 200,000) shot with a Canon 5D.  I converted the CR2 (RAW) to jpegs and edited the project in Final Cut Pro using those jpegs.  I then used Automatic Duck to send the FCP project to After Effects where I used the Batch n Replace script from aescripts.com (thanks Lloyd!) to replace the jpegs with the CR2 files for color correction.  The problem I'm running into is the script creates a new project where the CR2 files have replaced the jpegs, however everything is offline.  The images for each sequence are sorted into folders so I go to the first image in  a folder and tell AE to replace it with the proper file.  AE thinks for a bit and finds and replaces all of the other images in that folder.  Depending on how many images are in a particular folder, it can take anywhere from 5 minutes to several hours for AE to finish.  It took over 4 hours for AE to relink a project with 10 shots/images sequences containing over 12,000 images.
    All of the AE project files are shared via Dropbox with the other Mac Pro in my studio.  I opened one of the projects on the other computer and tried to relink to the CR2 files on my RAID over the network but I had to do each image one by one.  Is there a way to relink the files over the network the same way as if they were on my own computer?

    This is more of an After Effects issue but I thought someone here might be able to help me or point me in the right direction.
    I have a project that was created entirely with still images (almost 200,000) shot with a Canon 5D.  I converted the CR2 (RAW) to jpegs and edited the project in Final Cut Pro using those jpegs.  I then used Automatic Duck to send the FCP project to After Effects where I used the Batch n Replace script from aescripts.com (thanks Lloyd!) to replace the jpegs with the CR2 files for color correction.  The problem I'm running into is the script creates a new project where the CR2 files have replaced the jpegs, however everything is offline.  The images for each sequence are sorted into folders so I go to the first image in  a folder and tell AE to replace it with the proper file.  AE thinks for a bit and finds and replaces all of the other images in that folder.  Depending on how many images are in a particular folder, it can take anywhere from 5 minutes to several hours for AE to finish.  It took over 4 hours for AE to relink a project with 10 shots/images sequences containing over 12,000 images.
    All of the AE project files are shared via Dropbox with the other Mac Pro in my studio.  I opened one of the projects on the other computer and tried to relink to the CR2 files on my RAID over the network but I had to do each image one by one.  Is there a way to relink the files over the network the same way as if they were on my own computer?

  • Replacing/relinking files over a network

    This might be an OS issue and not related to After Effects but I thought I would give it a shot here.
    I have a project that was created entirely with still images (almost 200,000) shot with a Canon 5D.  I converted the CR2 (RAW) to jpegs and edited the project in Final Cut Pro using those jpegs.  I then used Automatic Duck to send the FCP project to After Effects where I used the Batch n Replace script from aescripts.com (thanks Lloyd!) to replace the jpegs with the CR2 files for color correction.  The problem I'm running into is the script creates a new project where the CR2 files have replaced the jpegs, however everything is offline.  The images for each sequence are sorted into folders so I go to the first image in  a folder and tell AE to replace it with the proper file.  AE thinks for a bit and finds and replaces all of the other images in that folder.  Depending on how many images are in a particular folder, it can take anywhere from 5 minutes to several hours for AE to finish.  It took over 4 hours for AE to relink a project with 10 shots/images sequences containing over 12,000 images.
    All of the AE project files are shared via Dropbox with the other Mac Pro in my studio.  I opened one of the projects on the other computer and tried to relink to the CR2 files on my RAID over the network but I had to do each image one by one.  Is there a way to relink the files over the network the same way as if they were on my own computer?

    Thank you all for responding.
    DaveS,
    Ideally we would be able to work on two computers, sharing the project files via Dropbox.  As it stands now, we do have the same file paths on each computer for the images, just the work hard drives have different names.
    Computer 1: Hard Drive A: Project Folder: Project Stills: CR2 files
    Computer 2: Hard Drive B: Project Folder: Project Stills: CR2 files
    It does take a long time to relink the files but I think that is in large part due to the nature of the project.  Do you know of a way that could speed up this process?
    And it was a project with 12,000 still image footage items
    Dave L,
    The jpegs exported form Lightroom are 5616x3744.  FCP has a frame size limitation so I would make a sequence set to 4096x2731 and place the jpegs in there.  Think of those sequences as quicktime files.  I would use them to do the edit in my 2K sequence.  Once the edit was in AE, I would resize those 4K sequences to 5616x3744, tweak my edit/frame/scale as necessary.
    Mylenium,
    That article is pretty interesting, espceially since we have been talking about trying out the Blackmagic camera, however, working with quicktimes isn't an option for this project for various reasons.  If we were strictly editing on 1s we could do that but we often change parts of a single shot to 3s or 4s and will hold on a single image for a moment.  Going back and making new quicktimes everytime we wanted to make a change like that would probably be more time consuming than the issue we are having now.  And storage for 5K quicktimes would be an issue as well.
    When I wrote that first post, a deadline was approaching fast and we were worried we wouldn't make it but we did.  Now we have some time and are looking at ways to make this process as efficient as possible.  We are in the color correction and compositing stage so everything is mostly going to be done in AE. 
    The whole project is 40 minutes long and we have each scene as its own AE project.  When they are all combined into the master AE project, the file size is 1.5 GB and it takes over an hour to open.  Ideally, we wouldn't need to open that project very often, really only when we are doing exports.  Is there a way to bring that file size down while still retaining the RAW images.  Is there a way to somehow proxy the scene projects in the master project?  Do you know if Adobe is working on ways to improve working with CR2/RAW in AE?
    I know this a weird workflow and not really what AE was designed to do, but without spending $100,000+ at a high end post house, this is the best workflow we could come up with, while still retaining the RAW information.  We tried working with TIFFs but the sheer volume of images we have and each TIFF image averaging 100 MB it was too much of a storage burden.  If anyone has any suggestions to help with any of this or someone from Adobe can shed some insight, I will be forever grateful.

  • I need to copy files over the network PSSession . ( Firewall / DMZ / Etc. )

    Hello
    I need to copy files over the network PSSession . ( Firewall / DMZ / Etc. )
    I have a script where I copy from my local server ( server1) to the remote server ( server2 ), but I can´t not make script that will copy from the remote server to my local by my session. From server2 to server1
    Script is as below ...:-)
    HELP : ....
    winrm s winrm/config/client '@{TrustedHosts="SERVER2"}'
        $Source = "D:\test\ok.log"
        $Destination = "D:\test\ok.log"
        $session = New-PSSession -ComputerName SERVER2
    Set-StrictMode -Version Latest
    ## Get the source file, and then get its content
    $sourcePath = (Resolve-Path $source).Path
    $sourceBytes = [IO.File]::ReadAllBytes($sourcePath)
    $streamChunks = @()
    ## Now break it into chunks to stream
    Write-Progress -Activity "Sending $Source" -Status "Preparing file"
    $streamSize = 1MB
    for($position = 0; $position -lt $sourceBytes.Length;
        $position += $streamSize)
        $remaining = $sourceBytes.Length - $position
        $remaining = [Math]::Min($remaining, $streamSize)
        $nextChunk = New-Object byte[] $remaining
        [Array]::Copy($sourcebytes, $position, $nextChunk, 0, $remaining)
        $streamChunks += ,$nextChunk
    $remoteScript = {
        param($destination, $length)
        ## Convert the destination path to a full filesytem path (to support
        ## relative paths)
        $Destination = $executionContext.SessionState.`
            Path.GetUnresolvedProviderPathFromPSPath($Destination)
        ## Create a new array to hold the file content
        $destBytes = New-Object byte[] $length
        $position = 0
        ## Go through the input, and fill in the new array of file content
        foreach($chunk in $input)
            Write-Progress -Activity "Writing $Destination" `
                -Status "Sending file" `
                -PercentComplete ($position / $length * 100)
            [GC]::Collect()
            [Array]::Copy($chunk, 0, $destBytes, $position, $chunk.Length)
            $position += $chunk.Length
        ## Write the content to the new file
        [IO.File]::WriteAllBytes($destination, $destBytes)
        ## Show the result
        Get-Item $destination
        [GC]::Collect()
    ## Stream the chunks into the remote script
    $streamChunks | Invoke-Command -Session $session $remoteScript `
        -ArgumentList $destination,$sourceBytes.Length
        Remove-PSSession -Session $session

    But have will the script look,  if i need to copy from
    From server2 to server1.
    My script copy from server1 to server2 and working, but I need server2
    to server1.

  • Java send WAV file thorugh modem to phone

    I am currently using Java communication API to configure a modem to send a WAV file to a phone. Once the user answer the phone, he/she will hear the WAV file.
    I am using AT command. I got the "CONNECT" from the modem. I am ready to send the WAV file. But how to format the file ?
    I directly send the file by write(), but I cannot hear the voice ...
    How to do ?
    Thanks !

    Hi everybody,
    I am also working on modems and trying to send wav files to phone over modem. As far as I know, the code should be something like :
    send("AT#CLS=8");     expect("OK"); //voice initialize
    send("AT#VLS=0"); expect("VCON"); //use phone line
    send("at#vsm=128,8000"); expect("OK"); // I think this command about sound file format
    send("AT#VTX");     expect("CONNECT"); //voice transmit
    /* send a small music file here */
    expect(" VCON");
    And most of sites that I searched says that the music file must have those properties: "PCM 8000Hz Mono 128kbps" ... Eventhough I have been tried on this task for many months, I have not succeeded in, yet :(
    If you have any idea about solution and if you can help, this will really be helpful :) Thanks!

  • Cannot Copy Files over a network

    I've had a new hard drive installed in iMac by Apple, and Apple re-installed the OS, which is running 10.6.7 (all current software updates are installed). The iMac is part of a network connecting to a OS X Server 10.4.10
    All of the Network Drives have been connected, the user can copy documents under 1MB to and from the server fine. However if we try to copy files over 1MB the first file will copy fine, but then no more files can be copied to the server from this machine, regardless of the size.
    If i use another Mac, with the same user credentials I can copy files of any size without any issues. I have tried connecting to the Network using both the Ethernet port and Airport but I experience the same issue regardless.
    If I reboot the iMac I can copy a file over 1MB again and then the symptoms re-present themselves. I have tried creating a users, new network drives, folders etc. I can connect using any user, to any of the new folders from any other machine on the network but not from this one.
    When the copying fails Finder just hangs with
    Copying "" to "ShareName" rather than having the name of the file, I believe this may be where the error lies.
    I have also tried running the App Maintenance from Titanium Software, after running this i can copy files over the network fine, but after I have copied 10 or so files, the situation goes back to not copying files correctly. 
    Tags:

    I have tried several files and also I have copied the files on to a USB Hard Drive and then onto another machine, that machine was able to copy the files over the network.
    The Firewall is switched off on this Mac, I have tried various different options with the Firewall, Turning it off, ensuring the AFP connections are allowed.
    Also using the Maintenance app, that I mentioned clears the Caches, repairs permissions etc etc

  • How to edit xml file particular value. and how to send xml file over ip address 192.168.2.10 using ftp

    how to edit xml file particular value. and how to send xml file over ip address 192.168.2.10 device using ftp through Ethernet

    Hello
    For using FTP function in LabVIEW, I recommend you to check this document: FTP Basics
    Also, take a look at FTP Browser.vi, which is available at the Example Finder.
    To edit a XML file, try to use VIs in XML palette. Maybe Write to XML.vi helps you.
    Post your current VI if possible.
    Regards
    Mondoni

  • Streaming audio file over the network w JMF. How to know when the file end

    Hi
    I am streaming audio file over the network using JMF. I want to be able to know when a file end so I can close the streaming session.
    Can some one please help
    Thanks

    If you put a ControllerListener on the Processor that's associated with generating the RTP stream, it'll generate an "EndOfMedia" event when the end of the file is reached.

  • Sharing Files over a network!

    I'm on a network with many other users, some of which are PC's and was wondering how I could share some of my files over the network. How would I go about making a folder or group of folders which are able to be accessed (either with or without a password) on the network. Making sure that only the files within the specified folders is placed on the network?
    Any help would be much appreciated!
    Thanks!

    Checkout SharePoints.

  • Corporate Win7/Office 2010 | Severe Lag when opening Office 2010 files over the network

    Good Evening Everyone,
    I work in a corporate environment for one of the top banks in the country (USA). We recently upgraded our computers to Windows 7. (The image has office 2010 included in the build)
    I've been experiencing some severe lag when opening Office files over the network. Let me start by saying I've researched a lot and have yet to find a solution that works or even makes much of an improvement. 
    Notes: My laptop is new (64-bit Win 7 Enterprise). The remote desktop where the files lie is new as well. (64-bit Win 7 Enterprise) Both computers have good hardware and more than enough juice to handle applications. 
    There are certain files I work on along with other co-workers that we store on a computer within the office. We simply create shortcuts to the files on our local machines and make changes, etc. from there. However, after this upgrade, every time I try to
    open a file on the remote computer, it takes over a 1 minute to load. I've spoken to our support team who sent someone out and confirmed it's not the network. 
    Both computers are on the same subnet as well. I've changed the trust center settings on both the client computers and "server" to trust any computer on the network. I have also changed the network card's speed from "Auto Negotiate" to
    full duplex 100mbps with no luck.
    I am out of options here and in desperate need for a fix. Even saving changes to a file we work on takes forever. 50% of the time when I close a spreadsheet, the title bar has a not responding message and takes a minute to eventually close. 
    PS: Extra Info : All computers run McAfee AV and use McAfee for disk encryption. I've confirmed all computers are up-to-date in every respect with the AV software. 
    Thanks,

    Try: 
    Open My Computer.
    Open the Tools menu and choose Folder Options...
    Select the File Types tab.
    Select the extension (for example DOC, or XLS) of the file that is slow to open.
    In the Details section, click [Advanced], and another dialog box will open. 
    In the Actions section, click Open then click [Edit...], and another dialog box will open.
    http://windowssecrets.com/forums/showthread.php/149672-10-9-2012-Updates-and-very-slow-opening-of-Office-files
    KR

  • WIFI dies when transferring big files over the network

    Hi, I have Dell Inspiron 1520 with ipw3945 driver, when I transfer big files over the network, my wifi dies, anybody knows what could it be? If you need additional information, feel free to ask...
    Thanks in advance

    I guess we shall see. I can't imagine we are the only 7 with these issues.  Mine is mainly just lag... and overall slowness.  I hope to work through this.  If it lasts much longer I will have to revert back all 3 of my lappies to FC which I really do not want to do.  But on the lappies i connect via wireless 90% of the time and need it to work. 
    By the way how are you guys configuring your wifi?  I am using the iwl drivers and wicd.
    Well I did some more testing and loaded up netcfg and still get the same results so that rules out that part.  I also did some packet captures and I am getting a bunch of tcp retransmissions followed by tcp segment lost followed by a reset which in turn kills my rdp session (remote desktop protocol). I also went back several versions of the uucode driver and still get the same reults so I guess it seems to be a kernel issue.  Back to FC I go.  Damn shame...
    Last edited by BKJ (2008-10-08 01:08:56)

  • I cannot printany web pages or emails over a wireless home network. My OS is windows 7 and am using an Epson printer. I know I have the home network set up correctly as i can print files over the network.

    I cannot print any email or web pages over a wireless home network. I know that I can print my files over this network, just not anything from the web or emails using Firefox. I am using Windows 7 and printing to an Epson.
    == This happened ==
    Every time Firefox opened
    == when I set up the wireless home network.

    The most likely reason for this is that the wrong printer is chosen in the File->Print window.
    In Firefox, go to File->Print and click the dropdown box with printer names. Ensure that the correct network printer is selected, then try printing again.

  • How Do I Send A File Over An Air-Port Network

    I have a good knowledge of mac but ive only just set upa network, weve got three new iMacs with airport networks, i know the networks work because we can chat over iChat but how do i send a file from one computer to another.
    Also one of the computers is getting the internet from the school network via Ethernet cable, can te other macs share the internet from this computer over the Airport network.
    (we do not have a base station)
    please help

    ]but how do i send a file from one computer to another.
    You can do that over iChat if you want.
    To share files between the computers you need to network them.
    For networking (ie sharing files), System Preferences -> Sharing -> File Sharing
    Then in Finder ⌘ K and type in the name of the other computer.
    ]Also one of the computers is getting the internet from the school network via Ethernet cable, can te other macs share the internet from this computer over the Airport network.
    System Preferences -> Sharing -> Internet Tab
    Share your connection from built-in-ethernet
    To computers using Airport
    Airport Options button will allow you to add a WEP password.
    I would check with your school network administrator that you are allowed to do this.

  • How to send simple file over network!

    Hi!!
    can any body guide me how to send a simple txt and other files (not media files) over net!
    what would i have to do to do so ?
    do i have to understand the files headers and got to use udp protocols if yes then plz tell me how
    Thank you!

    Well thanks for informing me...
    But what if i want to send a media file using udp not rtp protocol then should i have to so the same ?
    any one going to help me in other way ?
    Thank you !

Maybe you are looking for

  • Windows 8.1 Hyper-V virtualization rights

    So in Windows 7 Pro we had XP mode.  It was a full copy of XP which was licensed under the Windows 7 Pro license.  Do I have the licensing rights to install Windows 7 Pro on my Windows 8/8.1 machine using Hyper-V? Quite often my company uses XP mode

  • IWeb and SEO Tool - best practice?

    I have made an iweb website (published to a MobileMe account) and have downloaded iWeb SEO Tool. I have understood that there is one certain procedure in doing SEO that's a lot better than the other. What I usually do after making changes in iWeb is

  • Keychain verification code

    On my iPad, I'm trying to get iCloud keychain going. I've entered the first code (4 digit), received the SMS from apple (6 digit), and entered it. Now, nothing happens. The "in progress spinner" just spins forever. Any ideas how to fix? Thanks.

  • Selection list with multiple columns

    How can i create a selection list with multiple columns?

  • ASSERTION_FAILED in XD01,XD02 while maintaining Industry in Marketing tab

    While creating a new customer (XD01) or changing an existing customer (XD02), in the Marketing tab, Industry field, when a value is maintained, it results in runtime error ASSERTION_FAILED. This occurs in  line: assert condition lv_ind_sector_type is