audio-recording

Recording, modifying and playing audio on iOS

故事扮演 提交于 2019-12-02 21:41:05
问题 EDIT: In the end I used exactly as I explained below, AVRecorder for recording the speech and openAL for the pitch shift and playback. It worked out quite well. I got a question regarding recording, modifying and playing back audio. I asked a similar question before ( Record, modify pitch and play back audio in real time on iOS ) but I now have more information and could do with some further advice please. So firstly this is what I am trying to do (on a separate thread to the main thread):

Recording a wav file from the mic in Android - problems

泪湿孤枕 提交于 2019-12-02 21:26:05
I need to be able to create a WAV file using the mic in Android. Currently, I'm having a lot of trouble. So far, this is my situation. I'm using parts of the micDroid project code to record thus: //read thread int sampleRate = 44100; int bufferSize = AudioRecord.getMinBufferSize(sampleRate,android.media.AudioFormat.CHANNEL_CONFIGURATION_MONO,android.media.AudioFormat.ENCODING_PCM_16BIT); AudioRecord ar = new AudioRecord(AudioSource.MIC,sampleRate,android.media.AudioFormat.CHANNEL_CONFIGURATION_MONO,android.media.AudioFormat.ENCODING_PCM_16BIT,bufferSize); short[] buffer = new short[bufferSize]

Android: Audio Recording with voice level visualization

淺唱寂寞╮ 提交于 2019-12-02 19:34:00
I need to create a android application which is for recording voice while showing the voice(sound) level visualization. I already created an audio recording application but I can not add sound level visualization. How can I do it? please someone help me a giving suggestion or a sample tutorials link or code. Ali Create a xml activity_recording.xml like this. <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="180dp" android:layout_alignParentBottom="true" android:background=

Android Audio Analysis in Real-time

心已入冬 提交于 2019-12-02 19:29:41
I have searched for this online, but am still a bit confused (as I'm sure others will be if they think of something like this). I'd like to preface by saying that this is not for homework and/or profit. I wanted to create an app that could listen to your microwave as you prepare popcorn. It would work by sounding an alarm when there's a certain time interval between pops (say 5-6 seconds). Again, this is simply a project to keep me occupied - not for a class. Either way, I'm having trouble trying to figure out how to analyze the audio intake in real-time. That is, I need a way to log the time

Can I use AVCaptureSession to encode an AAC stream to memory?

只谈情不闲聊 提交于 2019-12-02 17:21:31
I'm writing an iOS app that streams video and audio over the network. I am using AVCaptureSession to grab raw video frames using AVCaptureVideoDataOutput and encode them in software using x264 . This works great. I wanted to do the same for audio, only that I don't need that much control on the audio side so I wanted to use the built in hardware encoder to produce an AAC stream. This meant using Audio Converter from the Audio Toolbox layer. In order to do so I put in a handler for AVCaptudeAudioDataOutput 's audio frames: - (void)captureOutput:(AVCaptureOutput *)captureOutput

Check if Android mic is being used by another app

大兔子大兔子 提交于 2019-12-02 08:35:31
问题 I want to check the noise level using the android mic. However before accessing the mic I want to know if the mic is being accessed by another application. How do I check if the mic is being accessed by another application? 回答1: Information about active input streams and where they are routed is held by the AudioFlinger , AudioPolicyManager and AudioHardware instances, which do not share this information with applications. The AudioManager class provides an isMicrophoneMute() method to

Recording, modifying and playing audio on iOS

大兔子大兔子 提交于 2019-12-02 07:52:34
EDIT: In the end I used exactly as I explained below, AVRecorder for recording the speech and openAL for the pitch shift and playback. It worked out quite well. I got a question regarding recording, modifying and playing back audio. I asked a similar question before ( Record, modify pitch and play back audio in real time on iOS ) but I now have more information and could do with some further advice please. So firstly this is what I am trying to do (on a separate thread to the main thread): monitor the iphone mic check for sound greater than a certain volume if above threshold start recording e

How to detect that system connected with microphone using JavaScript

我怕爱的太早我们不能终老 提交于 2019-12-02 07:17:31
问题 I'm using getUserMedia() for audio recording and it works correctly but have an issue with it. I want to display a message before starting recording that any microphone is connected with system or not. For this I have used following code and run this into chrome but it was not working correctly. if(navigator.getUserMedia || navigator.webkitGetUserMedia) { alert("Microphone is connected with your system"); } else { alert("Microphone is not connected with your system"); } when microphone is not

MediaPlayer prepare Failed Error(1,-17) when using recorded file .3gp

大城市里の小女人 提交于 2019-12-02 06:45:37
I am trying record from the AudioRecorder then I am trying to play the same with Media Player, But its giving mediaplayer.prepare() failed to prepare. Could any one tell me what could appropriate reason. Below is the code I am using public void onClick(View v) { recorder = new MediaRecorder(); recorder.setAudioSource(MediaRecorder.AudioSource.MIC); recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB); if(case_value==0) recorder.setOutputFile(deviceMIC_path); else if(case_value==1) recorder.setOutputFile(deviceMIC_Handset

How can I specify the output file's folder when calling RECORD_SOUND_ACTION?

吃可爱长大的小学妹 提交于 2019-12-02 06:44:25
I'd like to specify a destination folder when I call the MediaStore built-in sound recorder app, e.g. the sdcard folder. According to the Android documentation , there is no support for EXTRA_OUTPUT when calling the RECORD_SOUND_ACTION . How can I do this? You will have to allow the file to be recorded using whatever default filename and location are used and then move the file. Moving the file is far from trivial. Here's a complete example. import java.io.File; import java.io.IOException; import android.app.Activity; import android.content.Intent; import android.database.Cursor; import