Questions tagged [mp3]

MPEG-1 or MPEG-2 Audio Layer III, more commonly referred to as MP3, is a patented digital audio encoding format using a form of lossy data compression. It is a common audio format for consumer audio storage, as well as a de facto standard of digital audio compression for the transfer and playback of music on digital audio players.

The use in MP3 of a lossy compression algorithm is designed to greatly reduce the amount of data required to represent the audio recording and still sound like a faithful reproduction of the original uncompressed audio for most listeners. For example: An MP3 file that is created using the setting of 128 kbit/s will result in a file that is about 11 times smaller than the CD file created from the original audio source. An MP3 file can also be constructed at higher or lower bit rates, with higher or lower resulting quality.

The compression works by reducing accuracy of certain parts of sound that are considered to be beyond the auditory resolution ability of most people. This method is commonly referred to as perceptual coding. It uses psychoacoustic models to discard or reduce precision of components less audible to human hearing, and then records the remaining information in an efficient manner.

Further information and deeper analysis: MP3 on wikipedia

4559 questions
1
vote
0 answers

pyttsx3 produced mp3 not recognizable by pydub

In using pyttsx3 to produce mp3 audio files, it seems there's a problem that the mp3 file is not recognizable by pydub. pyttsx3: text to speech package pydub: audio handling package The error message says a lot of "Header missing". The code is…
Mark K
  • 8,767
  • 14
  • 58
  • 118
1
vote
1 answer

Streaming mp3 audio from a URL in circuitPython

I want to stream mp3 audio from a URL using the Raspberry Pi Pico W. This is my code: import adafruit_requests import wifi import socketpool import ssl import board import audiomp3 import audiobusio import os audio = audiobusio.I2SOut(board.GP10,…
1
vote
1 answer

how to turn raw audio output from analog microphone into mp3 file?

I am working with a RPI Pico w, I have an analog microphone connected correctly and outputting raw audio data, how do I convert it into a file I can listen to?? I am using the micro python language.
SweetWhite
  • 61
  • 7
1
vote
1 answer

How can I play a sound file on Kotlin JVM desktop?

Important note - I am writing a JVM Desktop application. I've tried KorAU libs but the documentation lacks examples it always fails with the following error for me: fun main() { val file = File("path/that/exists.mp3") runBlocking { …
Some random IT boy
  • 7,569
  • 2
  • 21
  • 47
1
vote
1 answer

mp3agic library java.io.IOException: Cannot delete temporary mp3 file from \Tomcat\localhost\ROOT\file.tmp

The code works completly fine but I get this exception: Caused by: java.io.IOException: Cannot delete…
noob234
  • 199
  • 2
  • 12
1
vote
0 answers

Mp3 Play from Stream on C#

I have music urls. Urls like http://site.com/audio.mp3 . I want play this file online, like youtube. Do you know a class or code can do this ?
Yasin Ozel
  • 273
  • 1
  • 6
  • 15
1
vote
1 answer

AudioServicesCreateSystemSoundID not playing mp3 files

Can anyone answer how to play mp3 files using AudioServicesCreateSystemSoundID()? I tried but not working. I have used the following code snippet for playing mp3 NSURL *soundURL = [[NSBundle mainBundle] URLForResource:fileName…
user963574
1
vote
1 answer

How to convert base64 mpeg to AudioClip in Unity?

After some research, I have got the following private float[] Normalize(float[] data) { float max = float.MinValue; for (int i = 0; i < data.Length; i++){ if (System.Math.Abs(data[i]) > max) max = System.Math.Abs(data[i]); } …
Chong Lip Phang
  • 8,755
  • 5
  • 65
  • 100
1
vote
0 answers

Pygame failing to load mp3 file

I am trying to load a mp3 file in pygame 2.1.2 (SDL 2.0.18, Python 3.9.13) but i am getting an error here is the code i am using: self.jump_sound = pygame.mixer.Sound('C:/Users/IAMAUSER/OneDrive/Desktop/Pro/Pygame/audio/jump.mp3') I am using…
1
vote
1 answer

How to turn binary from server back into audio file?

I am using express's res.sendFile() to send an .mp3 file from my server to my client as a response to a post request. I have been unable to transform the string of data (binary, I think?) back into a usable format for my web application. (ideally,…
1
vote
1 answer

Is it possible to stitch MP3 frames together?

I'm working with CBR, no bit reservoir, 192k bitrate, and 48k sample rate MP3 files. CBR + 192k bitrate + 48k sample rate gives a clean 576 bytes per frame. No bit reservoir is to make each frame independent. The reason I want to stitch them is that…
Maxime Dupré
  • 5,319
  • 7
  • 38
  • 72
1
vote
1 answer

MediaCodec gives IllegalStateException at getInputbuffer(index) in callback of OnInputBufferAvailable

I am decoding an mp3 file, first I convert the mp3 file into a chunks of byteArray of size 1000 and put it in a circularArray and then pass it to mediaCodec callback for decoding (decode one byteArray at a time), I follow this link. It is working…
Shan Ahmad
  • 31
  • 4
1
vote
1 answer

React native m3u radio player

I am trying to make a radio streaming app using react native but it doesn't work. I tried expo-av with Expo CLI, and react-native-radio-player, react-native-video from react native CLI all of them work well with mp3 and mp4 extensions but don't work…
Shady Hakim
  • 395
  • 6
  • 20
1
vote
0 answers

Issue installing pysox with support for mp3 on Mac

In the pysox documentation it states entering: brew install sox --with-lame --with-flac --with-libvorbis into the command line will install pysox with support for mp3, flac and ogg files. Source: https://pysox.readthedocs.io/en/latest/ However, when…
David
  • 11
  • 1
1
vote
0 answers

How to detect headset buttons? How to detect bluetooth headset buttons? android studio

I want to make an mp3 player for android. This is my first app and I have no idea how to get anything related to the button on the headphones. Thank you in advance