audio-recording

Trying to record audio but getting message “mediarecorder went away with unhandled events” and “Fatal signal 11 (SIGSEGV)…”

假如想象 提交于 2019-11-29 01:10:33
I am trying to record audio in android but I am facing a problem. I have start and stop buttons, "start" for starting recording and "stop" for stopping recording. The problem is, when I press the stop button then my application logs a message "W/MediaRecorder(635): mediarecorder went away with unhandled events". (Start function is saving the audio file properly.) Then, if I again press start or stop button then I get error message " A/libc(743): Fatal signal 11 (SIGSEGV) at 0x00000010 (code=1), thread 743 (xample.recorder)" Code of recording class is below: /** * Creates a new audio recording

Live audio stream java

可紊 提交于 2019-11-28 23:45:06
I am implementing live streaming from MIC to java server at another PC. But I am only hearing a white noise. I have attached both client and server program Client: import java.io.IOException; import java.net.DatagramPacket; import java.net.DatagramSocket; import java.net.InetAddress; import java.net.SocketException; import java.net.UnknownHostException; 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

How To Modify Android's Bluetooth Stack to Enable A2dp Sink

微笑、不失礼 提交于 2019-11-28 21:21:15
问题 I'm working on an audio recorder app that uses a bluetooth mic to record audio on to an Android device (Nexus 7 - rooted Android 4.4.2). It's currently implemented on HFP and everything is working fine. The bluetooth mic is implemented with Bluegiga's WT32 bluetooth module + a mic input, audio quality via HFP isn't great but it's sufficient for now. However, I'm now trying to change the bluetooth profile to A2dp, since there are two mic inputs (L/R) and WT32 supports A2dp (source). After much

Record audio on iPhone with smallest file size

安稳与你 提交于 2019-11-28 19:58:31
I want to record audio with iPhone and then upload it to server. I could record the audio, but my question is about which format should I use to record audio, so that the Recorder will result a file with smallest file size. Here are the results for few encoding supported by iPhone. Size of audio file in KB of duration 10 sec. kAudioFormatMPEG4AAC : 164 , kAudioFormatAppleLossless : 430, kAudioFormatAppleIMA4 : 475, kAudioFormatULaw : 889, kAudioFormatALaw : 889, Among these kAudioFormatMPEG4AAC is having smallest size. Srikar Appalaraju Apple iOS supports playback audio in these formats: AAC

iOS - Detect Blow into Mic and convert the results! (swift)

天大地大妈咪最大 提交于 2019-11-28 18:27:23
I need to develop an iOS App in swift which detects a blow in the microphone from a user. This has to be a Challenge-Game where two players have to blow into the iPhone mic one after the other. The decibel values should be measured and converted in meter or kilometer so I can determine a winner. The player which "blows further" (player1: 50km, player2: 70km) wins. Is this a possible implementation? I have this code in swift and I don't know how to proceed: import Foundation import UIKit import AVFoundation import CoreAudio class ViewController: UIViewController { // @IBOutlet weak var

get duration of audio file

孤者浪人 提交于 2019-11-28 16:31:22
问题 I have made a voice recorder app, and I want to show the duration of the recordings in a listview. I save the recordings like this: MediaRecorder recorder = new MediaRecorder(); recorder.setOutputFormat(MediaRecorder.OutputFormat.DEFAULT); recorder.setAudioEncoder(MediaRecorder.AudioEncoder.DEFAULT); folder = new File(Environment.getExternalStorageDirectory() + File.separator + "Audio recordings"); String[] files = folder.list(); int number = files.length + 1; String filename = "AudioSample"

Converting WAV to any compressed audio format in client-side JavaScript

孤街醉人 提交于 2019-11-28 16:13:41
I am recording audio from getUserMedia({audio:true}); in the browser using Recorder.js and then exporting it as a WAV file because that's the only option the library provides. A 1 minute 20 seconds file is 14.1 MB large. I need to upload the audio to a server and I need to do it fast. How do I convert the WAV audio in any other compressed format to lower the file size? I don't mind converting to: MP3 Opus WebM Ogg FLAC any other format you know of If there is no way as of now to convert to any of these formats, how can I compress the WAV file on the client? PS: I did a lot of searches to find

Playing back sound coming from microphone in real-time

此生再无相见时 提交于 2019-11-28 15:54:26
I've been trying to get my application recording the sound coming from the microphone and playing it back in (approximately) real-time, however without success. I'm using AudioRecord and AudioTrack classes for record and playback, respectively. I've tried different approaches, I've tried to record the incoming sound and write it to a file and it worked fine. I've also tried to playback sound from that file AFTER with AudioTrack and it worked fine too. The problem is when I try to play the sound in real-time, instead of reading a file after it's written. Here is the code: //variables private

how to convert or record .wav file in 16khz 16bit mono little-endian?

微笑、不失礼 提交于 2019-11-28 12:36:05
I m just implementing sphinx4 speech recognition in java..whta i need is how to record sound or convert any sound .wave file in to 16khz 16bit mono little-endian file. had search a lot for this..but no specific guidance i have got..hope anyone from stack overflow family can help me out or give me a proper guidance in that. 1). i need to just record audio in android with the 16khz 16bit mono little-endian file format in wave file or 2). i need to convert the prerecorded file with any sampling rate with the 16khz 16bit mono little-endian format in java.. i need to implement one of above feature.

Recording audio in Chrome for Android using web audio API and navigator.getUserMedia

自古美人都是妖i 提交于 2019-11-28 09:57:41
问题 Chrome for Android versions 30 and 31 beta on Android 4.1 do not appear to correctly record audio using HTML5 web audio and navigator.webkitGetUserMedia. (Chrome 30+ on Android is supposed to support these APIs.) The symptom is that the code appears to work correctly, including displaying the prompt for whether or not to allow microphone access, but recorded data contains nothing but zeros. I created a simplified testcase (go to http://jsfiddle.net/JCFtK/, and click Record button, then choose