I want two compare two voice files and find difference between them.
Suppose I have an original file of a music track and another file that is read out of that music by me, I want two compare these two files and find difference between their phonemes. Actually the words aren't important for me, the important thing is similarity in phonemes and I want to find something like the percentage of similarity. I prefer to implement something with Python.
You could try audio fingerprinting using fpcalc in Chromaprint.
Chromaprint is the core component of the AcoustID project.
The audio fingerprinting is done using fpcalc in Chromaprint.
fpcalc should be placed in the same directory as the Python script.
Python bindings for Chromaprint acoustic fingerprinting and the Acoustid API.
https://pypi.python.org/pypi/pyacoustid
Bellow is an example article with python demo code.
Comparing Non-Identical Audio Files for Duplicate Content with Cross-Correlated Fingerprints
http://www.randombytes.org/audio_comparison.html
How does Chromaprint work?
http://oxygene.sk/2011/01/how-does-chromaprint-work/
Related
I'm looking to extract all images from new and legacy Word documents and spreadsheets to assist in a real time document classification system, and looking at the documentation, I seem to have run into a problem. I'm having no problems finding documentation within the hwpf module and packages for extracting images from the file, but when it comes to the other 3, it seems as though they don't support the same methods.
What I want to do is to have one block of code that is document type agnostic when it comes to the 4 above mentioned types, I just want fast, easy access to the pictures in the files so I can move on to my next task, but at this point it looks like only the hwpf module supports extraction of pictures or the methods in 'PicturesTable'.
I'm also somewhat concerned about the performance of the library: it looks like it loads the entire file when all I want to do is scrape the images out of it. Any suggestions on a library that operates directly on the 'Data' bytestream and the folder structure of the .***x zip files?
I've already tried using OLEtools to try to extract pictures from the streams, and I'm now moving on to this tool. I havn't tried any tools that operate on the lower levels of the documents yet though.
I've found a really amazing wallpaper and later found out that it was a modified version of the original picture (which is an album cover).
Is anyone aware of the program or script being used in order to produce such kind of picture given any input?
Original picture:
Processed picture:
Zoom to the processed picture to see the style:
Is anyone aware of the program or script being used in order to produce such kind of picture given any input?
I am aware of one computer vision area called "Style transfer" using deep neural networks. There is this famous paper on this topic.
A few GitHub repos:
https://github.com/lengstrom/fast-style-transfer
https://github.com/fzliu/style-transfer
https://github.com/anishathalye/neural-style
i would say it can be done eadily by script. I am building an art generator called the BoredArt Club and using PHP GDlib for image manip. But if I wanted to use imageMagicK i could do more and it has a windows commandline option.
as for online tools... look at LunaPic and imgonline (UA i think)... they have masking tools and textures, etc fun stuff
I have a bash shell script that uses ImageMagick that will do something similar. See my script, weave
Here is an example:
Input:
Processed:
How could I read Garmin's .fit file on Linux. I'd like to use it for some data analysis but the file is a binary file.
I have visited http://garmin.kiesewetter.nl/ but the website does not seem to work.
Thanks
You can use GPSbabel to do this. It's a command-line tool, so you end up with something like:
gpsbabel -i garmin_fit -f {filename}.fit -o csv -F {output filename}.csv
and you'll get a text file with all the lat/long coordinates.
What's trickier is getting out other data, ie: if you want speed, time, or other information from the .fit file. You can easily get those into a .gpx, where they're in xml and human-readable, but I haven't yet found a single line solution for getting that data into a csv.
The company that created ANT made an SDK package available here:
https://www.thisisant.com/resources/fit
When unzipping this, there is a java/FitCSVTool.jar file. Then:
java -jar java/FitCSVTool.jar -b input.fit output.csv
I tested with a couple of files and it seems to work really well. Then of course the format of the csv can be a little bit complex.
For example, latitude and longitude are stored in semicircles, so it should be multiplied by 180/(2^31) to give GPS coordinates.
You need to convert the file to a .csv, the Garmin repair tool at http://garmin.kiesewetter.nl/ will do this for you. I've just loaded the site fine, try again it may have been temporarily down.
To add a little more detail:
"FIT or Flexible and Interoperable Data Transfer is a file format used for GPS tracks and routes. It is used by newer Garmin fitness GPS devices, including the Edge and Forerunner." From the OpenStreetMap Wiki http://wiki.openstreetmap.org/wiki/FIT
There are many tools to convert these files to other formats for different uses, which one you choose depends on the use. GPSBabel is another converer tool that may help. gpsbabel.org (I can't post two links yet :)
This page parses the file and lets you download it as tables. https://www.fitfileviewer.com/ The fun bit is converting the timestamps from numbers to readable timestamps Garmin .fit file timestamp
I like reading the PoC||GTFO issues and one thing I found remarkable when I first discovered it, was the "polyglot" nature of their PDF files.
Let met explain: when you consider for example their 8th issue, you may unzip files from it; execute the encryption they are talking about by running it as a script and even better(worse?) with their 9th issue you can even play it as a music file!
I'm currently in the process of writing small scripts every week and writing each time a little one page PDF in LaTeX to explain the said scripts. So I would really enjoy being able to create the same kind of PDF files. Sadly they explained (partly) in their first issue how to include zip files, but they did so through three small sketches of cmd lines without actual explanations.
So my question is basically :
how can one create such a polyglot PDF file containing stuff like a zip as well as being a shell script which may be run using arguments just like normal scripts?
I'm asking here about the process of creation, not just an explanation of how this is possible. The ideal way for me would that there are already some scripts or programs allowing to create easily such PDF files.
I've tried to search the net for the keywords "polyglot files" and others of the kind and wasn't able to find any useful matches. Maybe this process has another name?
I've already read the presentation by Julia Wolf which explains how things works, but I sadly haven't had time to apply the knowledge there to real world, because I'm sadly not used to play with file headers and the way a PDF is constructed.
EDIT:
Okay, I've read more and found the 7th edition of PoC||GTFO to be really informative concerning this subject. I may end up being able to create my own scripts to do such polyglot PDF files if I have some more time to consider it.
I played around with polyglots myself after attending Ange's talks and also talking to him in person. You really need to understand the file formats to be able to nest them into each other.
However, long story short, here are some links I found extremely useful for creating polyglots:
Some older Google Code Trunk
PoC of the polyglot stuff
Especially the second link (to github) will help you creating polyglots, but also understanding how they are working and how they are implemented. Since it is mostly Python stuff and very well / clean written, it is very useful and easy to follow.
I feel dissecting some file formats would be a good place to start. You can find many file format specifications for different file types through Google, but they can be a tough read and will likely take you some time to translate into whatever language you are using.
PDF: https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/PDF32000_2008.pdf
ELF: https://www.cs.cmu.edu/afs/cs/academic/class/15213-s00/doc/elf.pdf
ZIP: http://kat.sdf.org/zip_file_format.txt
The language(s) you select will need a way to read and write raw bytes (not just ascii alphanumeric), so perhaps C would be good for more direct access to memory. Some Python tricks could help with open sourcing the scripts easily.
To dissect the files, you may want to build a tool kinda like https://github.com/kvesel/zipbrk/ to take them apart, then put them all back together in a polyglot format. For example, zip does not require the section headers to be at the start (or even contiguous for that matter), and PDF magic number can appear in multiple places within the file as well. I also believe I recall a polyglot tool being included in one of the PoC||GTFO publishings (maybe issue 8 or 2??) as a polyglot in the pdf file.
Don't forget the hackers bible! :)
https://nostarch.com/gtfo
I have quite a lot of music files but their title attributes have the track numbers infront of them, like 01.TrackName, 02.TrackName.
What is the best way to strip off integers from the file attributes?
Edit: I am using windows and all music files are MP3. Any solution as batch files, c++ or .net etc will be appreciated.
I'd use Flexible File Renamer to rename the files per your needs. It does require some familiarity with patterns and, in some advanced scenarios, regular expressions.
There are several other similar tools on the market, each with their own scope as to what they can do and how easily it can be done.
See http://hp.vector.co.jp/authors/VA014830/english/FlexRena/. The website shows a screenshot of a user batch-renaming a set of MP3 files using not only elements within the filename but also ID3 tag-related information such as track title and artist.
I use Flash Renamer Great util, and it has support for renameing MP3's
You can use an ID3 tag editor. Some have support for batch tagging using regexes. Another option would be to use python with the id3 tag library (I don't remember its name...)
Edit: For example http://www.mp3tag.de/en/
Mutagen: Id3 tag library for python.