I am currently trying to write a program in which i have to process a .wav file, i need to process the data in the wave file.
My main aim is to extract the data from currently existing file, create a new file with appropriate wave headers, and then write the information/data in the new file.
I am expecting the program to be written in java.
I have come across this in Google:
http://www.jstick.de/javaprojects/sampleeditor
This is a WAV editor and should provide you with the ideas for your implementation since it is open source.
Related
I am working on DARPA dataset for network intrusion detection system. The DARPA dataset contains tcpdump files for training and testing purpose. Now when I open the file in text editor like wordpad, notepad++, I can't read the output file.
How can we read tcpdumfile so that I can save the records in database ?
Well, one way to read it is with, well, tcpdump; that's why they're called tcpdump files, after all.
Another possibility would be to use it with the TShark program that comes with Wireshark; it can be told to write the values of particular protocol fields to the standard output, and you could have a program that reads those values and puts them in a database.
If you want to do this in a Java program, some possibilities are:
jpcap;
jNetPcap;
the jNetWORKS SDK, if I understand what their page for it is saying - that's a commercial product;
possibly other packet-parsing Java libraries.
One thing that is most definitely NOT a possibility is trying to process the files as text - for example, trying to read them in a text editor - because they're not text files! They're binary files, and the packet data for each packet is also binary, and you'd need code that understands the protocols in order to parse that binary data and extract whatever fields you want to put into the database.
I am currently using Apache POI to enter data into Excel file. The only problem is I can not keep the file open if I have to append data to the same file. Are there any specific sample codes which would allow me to do so?
My basic requirement is to fetch Runtime data from a place (this I am able to do) and add it to the Excel sheet while the file is still open.
Any suggestions?
I don't think that this is possible without a C# addon or some kind of macro. You could write a simple C# addon for Excel that connects to your java programm and recieves the realtime data. The addon will write it to the spreadsheat then.
I am trying to add a feature to some audio processing software I have written.
My software already captures sound from a microphone input, processes it in real time, and sends the result to a speaker output. (This is already a threaded application.) I've been using javax.sound.sampled.* and working with wav data (transforming it to and from numerical samples to do the processing.
I would like to add a feature to save both the raw input and the transformed output of a session with this software to wav files. But the signature for creating a new wav file (e.g., WavFile.newWavFile(...) seems to want to know in advance how many frames of data it is going to receive. Since these are live sessions of indeterminate time, I have no way of knowing this information before hand.
Am I missing something? Is there some way around this, other than a hack like saving files of data or samples, and then post-processing it?
Most audio file writers need to know the full file size before writing to an output stream. There's an open source project called Tritonus which is an implementation of the Java sound API that has an AudioOutputStream plugin you could try.
i want to create audio file using text. in this case i tried AudioOutputStream and AudioSystem.write() methods this way audio file created but problem in running. so if any idea that helps for converting text to audio file please write below.
thank you.
Piyush
If you want to make some kind of "text to speech" you'll need a library, which will handle this. Otherwise you will have a lot of work. Try this project:
http://freetts.sourceforge.net/docs/index.php
You think creating audio from text is as simple as writing text data to an audio stream ? ...
LOL
To convert text to audio, you have to rely upon rather complicated tools, like text-to-speech engines.
Hopefully, java is known for the forrest of many trees. Concerning text-to-speech, you can rely upon this excellent question and its anwsers.
I want to use the Java API in my NetLogo program. For that, I need to write to a text file and read input from a text file. How can this be done in NetLogo?
Additionally - what are the ways by which I can integrate the Java API with NetLogo?
Yes, you can read and write to a text file from NetLogo itself. There is no need to use the Java API. Read about the file commands in the manual found here: http://ccl.northwestern.edu/netlogo/5.0/docs/programming.html#fileio