How to encode a WAV to a mp3 on a Android device

Pure Java Look into Tritonus’s clean room implementation of javasound which offers an MP3 encoder plugin here: http://www.tritonus.org/plugins.html Secondly, I would suggest looking into jzoom’s libraries JLayer or JLayerME: http://www.javazoom.net/javalayer/javalayer.html (this may only be decode, not sure) If those doesn’t suit your need you can look at this article from 2000 about adding MP3 capabilities … Read more

Right place for putting mp3 files in an android project

The best place to put such .mp3 or any other files would be in the assets folder. These files once stored will become a part of your android app itself and can be read easily. This tutorial describes it well. AssetFileDescriptor afd = getAssets().openFd(“AudioFile.mp3”); MediaPlayer player = new MediaPlayer(); player.setDataSource(afd.getFileDescriptor(),afd.getStartOffset(),afd.getLength()); player.prepare(); player.start(); Alternatively you can … Read more

Any good recommendations for MP3/Sound libraries for java? [closed]

JLayer should do everything you need. It’s not dead, it’s just stable. The author finished it up quite a long time ago and the MP3 format has not seen much change since. You’ll notice that his MP3SPI codebase is a little more recent. What MP3SPI does, is that translates JLayer’s abilities into JavaSound APIs. Thus … Read more

Python library for playing fixed-frequency sound

PyAudiere is a simple cross-platform solution for the problem: >>> import audiere >>> d = audiere.open_device() >>> t = d.create_tone(17000) # 17 KHz >>> t.play() # non-blocking call >>> import time >>> time.sleep(5) >>> t.stop() pyaudiere.org is gone. The site and binary installers for Python 2 (debian, windows) are available via the wayback machine e.g., … Read more

How to convert MP3 to WAV in Python

I maintain an open source library, pydub, which can help you out with that. from pydub import AudioSegment sound = AudioSegment.from_mp3(“/path/to/file.mp3”) sound.export(“/output/path/file.wav”, format=”wav”) One caveat: it uses ffmpeg to handle audio format conversions (except for wav files, which python handles natively). note: you probably shouldn’t do this conversion on GAE :/ even if it did … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)