WAV « Media File « Java I/O Q&A





1. Join two WAV files from Java?    stackoverflow.com

What's the simplest way to concatenate two WAV files in Java 1.6? (Equal frequency and all, nothing fancy.) (This is probably sooo simple, but my Google-fu seems weak ...

2. playing wav file in java - how do I extend or concatenate the sound played?    stackoverflow.com

Is it possible to create a temporary file that contains a "loop" of a wav file? Or is it possible to manipulate the stream sent to a stream reader/writer? Basically I want to ...

3. How can I play a WAV file using Java?    stackoverflow.com

I send WAV files using a client and server, but I want to play the WAV when it received. I try this method but it did not work:

Runtime.getRuntime().exec("C:\\Documents and ...

4. How to split a wav file into smaller chunks using Java?    stackoverflow.com

I have a very huge WAV file, about 100MB in size. I would like to use Java to read this wav file and split it into smaller chunks for every 2 ...

5. Javafx and wav files    stackoverflow.com

I'm playing around with javafx and I have modified the code of the MediaPleyer demo trying to reproduce a wav file. It doesn't work.

/*
 * Copyright (c) 2009, SUN Microsystems, Inc.
 ...

6. Java - downsampling wav audio file    stackoverflow.com

Hi I need to downsample a wav audio file's sample rate from 44.1kHz to 8kHz. I have to do all the work manually with a byte array...it's for academic purposes. I ...

7. How do you call the default media player to play a wav file in Java?    stackoverflow.com

How do you call the default media player to play a wav file in Java?

8. How to play .wav files with java    stackoverflow.com

I am trying to play a .wav file with java. I need it when a button is pressed to play a short beep sound. I have google it but most of ...

9. How to extract separate bytes from a wav file?    stackoverflow.com

..and do some action, say, print an "a" the number of times as the number of bytes ??





10. how to compare two wav files?    stackoverflow.com

Let's say, we have taken a mic input (say "hello") and stored it as a wav file. Then we take the same input "hello" from the mic. Now if the two ...

11. How do I combine/merge two wav files into one wav file?    stackoverflow.com

How can I merge two wav files using java? I tried this but it didn't work correctly, is their any other way to do it?

12. play wav files one after the other in java    stackoverflow.com

I'm trying to play a few WAV files after each other. I tried this method:

for (String file : audioFiles) {
    new AePlayWave(file).start();
}
but that plays them all at ...

13. Outputting Java Speech sound as .wav file    stackoverflow.com

I have been looking for a way to save the output of speech synthesis as a .wav file. I have downloaded FreeTTS and CloudGarden, but FreeTTS has problems with setting up ...

14. Java - reading, manipulating and writing WAV files    stackoverflow.com

In a Java program, what is the best way to read an audio file (WAV file) to an array of numbers (float[], short[],...), and to write a WAV file ...

15. how to detect a presence of word /audio silence in the wav file using java?    stackoverflow.com

I am working on a speech recognizer project as a part of it want from a wav file want to find the presence of silence or detect the presence of word ...

16. how to play wav file in java 1.4    stackoverflow.com

as title How can i play a sound file repeatedly in java v1.4?





17. Wav File As Frequency Image    stackoverflow.com

I want to show a wav file as an image, so the frequency is charted on screen like you would see in a wav editor. Any ideas?

18. comparing wav files    stackoverflow.com

I have a (mostly) working program to compare two wav files, to see if the smaller one is in the bigger one. This is done in java. I do this by first ...

19. Strange wav files. What filter can I use?    stackoverflow.com

I am working currently on a few projects connected with audio files recognition. However one type of files creates many problems. From Audacity: alt text Are there any known filters/algorithms which ...

20. How to calculate the SNR (Signal noise ratio) for a WAV file    stackoverflow.com

I have a WAV file that I access with a FileInputStream object. I can read the hex values without a problem. I am trying to calculate the SNR of an orignal ...

21. Music Transcription of Wav files in Java    stackoverflow.com

I have project about music transcription using Java, the thing is,, I have created an applet that records sound and saves it into a WAV file, the player should only play ...

22. I'm trying to get the volume level of a wav file using java's Sound API, but haven't been able to figure it out    stackoverflow.com

I'm going to be processing a lot of audio files, I don't need to play the files, but I want to be able to get the volume level at a regular ...

23. Reading wav file in Java    stackoverflow.com

I want to read wav files in Java and I am going to classify them with K-means. How can I read wav files in Java and assign them into an array or ...

24. Can't hear wav file on Linux - using java Clip - PulseAudioClip    stackoverflow.com

I am porting java application from Windows to Linux (Ubuntu 10.10) and came across the playing the sound on the Linux machine. The following code was cut out from the application, it ...

25. Search in a directory wav files    stackoverflow.com

I would like to search in a directory if wav files exist. How can I do that in java? Thank you.

26. Does a 24bit wav file's data chunk have signed or unsigned bytes?    stackoverflow.com

I am trying to write a program that will create 24 bit wav files using java. The java sound api does not support 24 bit audio so I am trying ...

27. How to add silence in front of and to the back of a WAV file    stackoverflow.com

How can I add silence to the beginning and the end of a WAV file with Java? the length of the silence should be variable.

28. How to split a Wav file into channels in java?    stackoverflow.com

I would like to write a Java program to split a wav file into channels. The input would be a wav file, and the output would be as many wav files ...

29. how can I remove noise from a wav file?    stackoverflow.com

I am doing speech recognition program which opens a site when a user tells url. But to do so, I have to remove noise from recorded wav file. How can I ...

30. How to divide a wav file into 1 second pieces with Java?    stackoverflow.com

I had a question previously: Reading wav file in Java Firstly, I want to read a wav file with Java and get its bytes to process into an array. Secondly, I ...

31. Problem with reading wav file with Java    stackoverflow.com

I use that API to read wav file at Java: Reading and Writing Wav Files in Java I read a wav file with Java and want to put all the ...

32. Convert .flv to .wav file in Java    stackoverflow.com

Is there any tutorial or sample code available for extracting audio stream from .flv and other video formats

33. How to read/write high-resolution (24-bit, 8 channel) .wav files in Java?    stackoverflow.com

I'm trying to write a Java application that manipulates high resolution .wav files. I'm having trouble importing the audio data, i.e. converting the .wav file into an array of doubles. When I ...

34. Segmenting a wav file with an XML using Java    stackoverflow.com

I have a bunch of wav files and corresponding XML files which contain times. What I need to do is split the wav files based on the times inside the XML files. Parsing ...

35. Extracting bytes from audio file - JAVA    stackoverflow.com

what is the difference between the following two implementations in extracting the bytes of DATA from an audio file ? The file is WAVE and i want to extract only the data, ...

36. 1's and 0's to an audio file in java    stackoverflow.com

I currently have a String that contains 1's and 0's. I want to make an audio file out of this string, preferably in .WAV format by using Java. How do i ...

37. How can I read a wav file and replace bits in it?    stackoverflow.com

I've just started learning Java and I'm working on an audio steganography project in Java (i.e. hiding a text file in a wav file). For that I store a text and wav ...

38. Suppressing noise in wav files    stackoverflow.com

I am working on a prototype for speech 2 text conversion using a wav file as an input .I am currently experimenting with several ASR's such as Microsoft SAPi, Sphinx etc. ...

39. how to write flac files in java    stackoverflow.com

Currently i have a requirement to write flac files in java. Earlier i was writing the audio input into a wav file and then converting it to flac file using a ...

40. How do I play a mono wav audio file using Java?    stackoverflow.com

I've been able to play a 2 channels ( stereo ) .wav file using sun.audio, also a .au mono file, but I can't open a one channel ( mono ) .wav ...

41. JAVA convert audio in byte[] to a .wav / .au file?    stackoverflow.com

Hi the target is to convert the audio captured from microphone, in JME, save to a audio file on the disk. The client is JME device that captures voice and stores ...

42. Java Sound Api: Wav file not playing after saving recording on disk    stackoverflow.com

I am making a sound recording from the mic and saving it as a .wav file to disk. I can't play the wav file with Media Player ? Is this normal ?

AudioFormat ...

43. Is there any open source Java program that can save .mid file as .wav file?    stackoverflow.com

Now I'm using iTunes to convert .mid file to .wav file, I wonder if there is a way that I can do this from my Java program, any open source Java ...

44. Concatenating wav files    bytes.com

Hi I want to concatenate 2 or more wav files . I concatenated two wav files, AudioInputstream and AudioSystem.write. I can play well. But when it is concatenated, there is a ...

46. Read and play a .wav file!!!!!!!    coderanch.com

48. wav file serialization?    coderanch.com

49. Converting wav file formats Using java Sound API    coderanch.com

Hi, My name is Murali. I am doing project on Sound Systems. My work is converting the differen wav file formats to a Standard format. For example 44000 sampled rate wav file to 8000 Sample rate. When I am trying to converting the file. I am getting exception like Unsupported Conversion. Please help me. Thanks in advance. I am sending my ...

50. Reading .wav file    coderanch.com

51. .wav files    coderanch.com

52. play wav file from console application    coderanch.com

Is it possible? All the stuff I've found about sound are related to applets. But I don't want an applet. My application executes from console. How do I do that? Feel free to offer any sample code. Thanks in advance. public class SoundPlayah { public static void main ( String[] args ) throws Exception { BufferedReader input = new BufferedReader ( ...

53. Saving .wav files with Java    coderanch.com

54. Play a .wav file    coderanch.com

Hello everyone, When using the following source codes to play a local .wav file, I always find .wav files can not played. Does anyone know what is the trouble? import java.io.File; import java.io.IOException; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.DataLine; import javax.sound.sampled.FloatControl; import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.SourceDataLine; public class Play { /** Plays audio from given file names. */ public static ...

56. Playing a .wav file    coderanch.com

I am trying to get a .wav file to play. What I have done so far throws an exception, but File is finding it and the sound file plays in a normal player so it isn't corrupted or anything like that. The error I get is: javax.sound.sampled.UnsupportedAudioFileException: could not get audio input stream from input file at javax.sound.sampled.AudioSystem.getAudioInputStream(AudioSystem.java:1170) at audio.SoundPlayer$Player.(SoundPlayer.java:50) at ...

57. Extract human sound from an Audio.wav file using java    coderanch.com

Dear All, I am working on a project where I have to extract the human sound from a audio .wav file using java. The audio .wav file may have 3 to 4 sounds like dog, cat, music and human. I will have to identify the human sound then exatract that part from the audio .wav file. I am using FFT.java and ...

58. wav file    coderanch.com

Hi again, I have a class to read wav files: import java.io.File; import java.io.IOException; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.DataLine; import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.SourceDataLine; import javax.sound.sampled.UnsupportedAudioFileException; public class PlayWavFile { public PlayWavFile(String source) { File audioFile = new File(source); AudioInputStream audioInputStream = null; try { audioInputStream = AudioSystem.getAudioInputStream(audioFile); } catch(IOException e) { } catch(UnsupportedAudioFileException e) { } AudioFormat format ...

59. handling WAV file    java-forums.org

Hello, I want to retrieve information out of a Wav file - for a Fourier transfrom. I am using AudioInputStream. The problem is that I would prefer it to be in float(s), because the bytes affect my analysis. Alterantivley, if you could provide me with a link to an FT of a wave file, that works well*, I'd be very greatful. ...

60. Split wav file    java-forums.org

Do you want the wav chunks you create (by splitting) to be playable outside of your program? Doesn't a wav file have a header? In which case, you'd need to repackage the data into new files complete with appropriate headers... Tolls method will def. split the file, but the resulting files might not be playable without re-assembly.

61. Can't hear the wav file im playing :( (using AudioSystem)    java-forums.org

Hai! Im trying to learn how to use javas sound package.. Even tho it's alot to read I'v read to the point where they espect me to be able to play a clip (my wav file) Now, It doesnt work for me :( Everything works it gives no error, but I still dont hear anything, and my speakers work.. I suppose ...

62. help to play file.wav in java    java-forums.org

63. compare two wav file    java-forums.org

Hello I have made a C sharp program that doing steganography ... this mean my program hide information in wav file... up to now is good The problem is that I need now a program (I prefer window program) to compare two wav files ... those wav files are the original file and the stego file (the wav file with the ...

64. play a wav file repeatedly    java-forums.org

try { File soundFile1 = new File("C:\\won.wav"); if (!soundFile1.exists()) { System.err.println("Wave file(s) not found!"); return; } AudioInputStream audioIn1 = AudioSystem.getAudioInputStream(soundFile1); // Get a sound clip resource. playing = AudioSystem.getClip(); // Open audio clip and load samples from the audio input stream. playing.open(audioIn3); // Play the file playing.start(); } catch (javax.sound.sampled.LineUnavailableException e) { e.printStackTrace(); return; } catch (Exception e) { e.printStackTrace(); return; ...

65. separating voices in a .wav file    java-forums.org

I am new to java and I am trying to break apart of wav files that has two voices in it. There are two voices and based on the Hertz I want it to silence out on of the voices in it. Can anyone help me develop a java class to do this? I attached the .wav file I am trying ...

67. Play the wav file    java-forums.org

I tried to play a wav file.....but it is giving an exception noclassDefoundError here is the code.. import java.io.IOException; import java.io.InputStream; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.SourceDataLine; import javax.sound.sampled.UnsupportedAudioFileException; import javax.sound.sampled.DataLine.Info; import java.io.FileInputStream; import java.io.FileNotFoundException; public class PlayWaveFile { public static void main(String a[]) { String wavfile=a[0]; FileInputStream inputStream; try { inputStream=new FileInputStream(wavfile); } catch(FileNotFoundException e) {return;} ...

68. Getting a new DataLine.info object NOT using a wav file help?    java-forums.org

PHP Code: import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.DataLine; import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.SourceDataLine; public class PlayFrequency extends Thread { private final int EXTERNAL_BUFFER_SIZE = 524288; // 128Kb float sampleRate = 44100.0f; int sampleSizeInBits = 16; int channels = 2; boolean signed = false; boolean bigEndian = true; enum Position { LEFT, RIGHT, NORMAL }; public PlayFrequency() { this.start(); } public void run() ...

70. Wav File Is Not Playing?    forums.oracle.com

71. Read Properties->Summary of a file (.wav file)    forums.oracle.com

Hi, I am working on a project where I need to validate the format of a .wav file. You can see the properties by right clicking on the file and go to Properties and Select Summary tab. IS there any function defined in java to read the Properties (summary) of a file or is there any other way I could do ...

72. what is a class i can use to play wav file's?    forums.oracle.com

73. how to add wav file that i will run it    forums.oracle.com

74. Help needed playing wav files (please)    forums.oracle.com

public static void main(String[] args) { Help mainFrame=new Help(); mainFrame.setSize(800,600); mainFrame.setTitle("Glenn's Java Jukebox"); mainFrame.setVisible(true); } private class DrawingCanvas extends Canvas{ private DrawingCanvas(){ setSize(100,400); } public void paint(Graphics g) { // do all the drawing of the jukebox in the g.drawString("please work",50,50); g.setColor(Color.yellow); g.fillRect(700,105,30,450); g.fillRect(80,105,30,450); g.setColor(Color.yellow); g.fillArc(80,10,650,200,-180,-180); g.setColor(Color.white); g.fillOval(150,60,20,20); g.fillOval(210,60,20,20); g.fillOval(270,60,20,20); g.fillOval(330,60,20,20); g.fillOval(390,60,20,20); g.fillOval(630,60,20,20); g.fillOval(450,60,20,20); g.fillOval(510,60,20,20); g.fillOval(570,60,20,20); g.setColor(Color.black); g.fillOval(180,60,20,20); g.fillOval(240,60,20,20); g.fillOval(300,60,20,20); g.fillOval(360,60,20,20); ...

75. Audio WAV File Delete Not Working    forums.oracle.com

I searched with the phrase "delete clip audio" on forums.sun.com to no avail and thought it odd that this had not been covered yet as it is a very general subject. After finding the solution to my problem I thought about posting it here for others who may have had this trouble. The problem was that after the audio file had ...

76. Extract parameters from a WAV file?    forums.oracle.com

OK.. I want to get a short simple wav file (recorded by myself) into Java, and then i want to extract from it the parameters of the sound itself (for example I have a wav file of the pronunciation of the letter 's' and I want to be able to extract the parameters -like amplitude, duration and so forth). Any Ideas/help ...

77. UnsupportedAudioFileException - Can't play .wav files!    forums.oracle.com

Hey everyone, I know a lot of other people have experienced the same problem but I haven't been able to find a decent solution. I am using the code for AePlayWave found at http://www.anyexample.com/programming/java/java_play_wav_sound_file.xml to play a simple .wav file. I know the code is correct because it works for one of the files I have, but that's just it--it can ...

78. Playing an audio file(.wav) using Java    forums.oracle.com

79. Exception error playing wav file??    forums.oracle.com

I compiled into jar file and ran it and all was well, i disconnected my internet and the specified sound file played but then a message appeared in the console. PlayWaveException: java.io.EOFException at PlaySound.play(PlaySound.java:39) at PingAndComplain.main(PingAndComplain.java:69) Caused by: java.io.EOFException at java.io.DataInputStream.readInt(Unknown Source) at com.sun.media.sound.WaveFileReader.getFMT(Unknown Source) at com.sun.media.sound.WaveFileReader.getAudioInputStream(Unknown Source ) at javax.sound.sampled.AudioSystem.getAudioInputStream(Unknown Source) at PlaySound.play(PlaySound.java:35) ... 1 more program exiting I have ...

80. Wats isthe API for Reading wav files in Java    forums.oracle.com

want to read .wav files or .mid (MID )files....i have tried it through javax.sound.sampled.* package...that is using all those AudioSystem,AudioFileFormat classes etc. i'm getting the no. of frames. But i actually want to read and interpret in such a way so that i can generate Notes like :-A,B,C,D,E,F,G. so what i have to do ??? Please let me know as early ...

81. How to open .wav file    forums.oracle.com

Thanks, armalcolm... I found that link before your answer but that's not enough, unless for me. I'm sure YOU know how I have to do for showing the notes in a graphic, but I suposse it's easier to copy a link, paste it here and reproach me how I couldn't find it.. In other forums no one could help me more ...

82. Extracting pitch from a sound (WAV) file    forums.oracle.com

83. Java Sound Issue - Bytearray To Wav file    forums.oracle.com