sample-rate

Change Sample rate with AudioConverter

南楼画角 提交于 2020-03-21 06:55:51
问题 I am trying to re-sample the input audio 44.1 kHz to 48 kHz. using AudioToolbox's AUAudioUnit.inputHandler writing out the input 44.1 kHZ to a wav file (this is working perfectly) converting the 44.1 kHz to 48 kHz and writing out this converted bytes to file. https://developer.apple.com/documentation/audiotoolbox/1503098-audioconverterfillcomplexbuffer The problem is in the 3rd step. After writing out to a file the voice is very noisy. here is my code: // convert to 48kHz var

Change sample rate of AudioContext (getUserMedia)

早过忘川 提交于 2020-01-09 13:02:11
问题 Im trying to record a 48000Hz recording via getUserMedia. But without luck. The returned audio MediaStream returns 44100Hz. How can i set this to 48000Hz? Here are snippets of my code: var startUsermedia = this.startUsermedia; navigator.getUserMedia({ audio: true, //sampleRate: 48000 }, startUsermedia, function (e) { console.log('No live audio input: ' + e); }); The startUsermedia function: startUsermedia: function (stream) { var input = audio_context.createMediaStreamSource(stream); console

OS X / iOS - Sample rate conversion for a buffer using AudioConverterFillComplexBuffer

偶尔善良 提交于 2019-12-31 09:05:14
问题 I'm writing a CoreAudio backend for an audio library called XAL. Input buffers can be of various sample rates. I'm using a single audio unit for output. Idea is to convert the buffers and mix them prior to sending them to the audio unit. Everything works as long as the input buffer has the same properties (sample rate, channel count, etc) as the output audio unit. Hence, the mixing part works. However, I'm stuck with sample rate and channel count conversion. From what I figured out, this is

my iOS app using audio units with an 8000 hertz sample rate returns a distorted voice

大兔子大兔子 提交于 2019-12-24 23:13:54
问题 I really need help with this issue. I'm developing an iOS application with audio units, the recorded audio needs to at 8bit / 8000 hertz sample rate using alaw format. How ever I'm getting a distorted voice coming out the speaker. I came across this sample online: http://www.stefanpopp.de/2011/capture-iphone-microphone/comment-page-1/ while trying to debug my app I used my audioFormat in his application and I am getting the same distorted sound. I guessing I either have incorrect settings or

How to convert any mp3 file to .wav 16khz mono 16bit

别来无恙 提交于 2019-12-20 08:40:31
问题 Please, help to choose solution for converting any mp3 file to special .wav - I'm a newbie with Linux command line tools, so It's hard for me right now. I need to get wav with 16khz mono 16bit sound properties from any mp3 file. I was trying ffmpeg -i 111.mp3 -ab 16k out.wav, but I got wav with the same rate as mp3 (22k). Please, help to construct right command line 回答1: kdazzle's solution is almost there - it still output a stereo wav, here is a slightly modified version that generate mono:

Android AudioRecord questions?

瘦欲@ 提交于 2019-12-18 17:04:44
问题 I have been messing around with the AudioRecord feature of the Android API and found some strange behaviors with it. Background info: My phone is a HTC Incredible I am using the Eclipse plugin for Android development with the emulator. Targeted platform or OS is 2.2... Since it is what my phone uses. Some code: bufferSize = AudioRecord.getMinBufferSize(FREQUENCY, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_16BIT); audioRecord = new AudioRecord(MediaRecorder.AudioSource

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

自作多情 提交于 2019-12-17 20:24:53
问题 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

FFMPEG wmv conversion to flv

风流意气都作罢 提交于 2019-12-12 12:12:57
问题 anyone using ffmpeg I have a fairly simple wmv exported by a user from movie maker with standard output and want to convert to .flv using C:>ffmpeg -i "E:\Jab Core 4 Recounters.wmv" -vcodec flv "C:\Net Projects\SVN\IntegratedAlgorithmics\src\MediaAdmin\MediaAdmin\bin\Debug\Movies\Jab Core 4 Recounters.flv" -ar 44100 the output / error i receive is FFmpeg version 0.5, Copyright (c) 2000-2009 Fabrice Bellard, et al. configuration: --enable-gpl --enable-postproc --enable-swscale --enable-avfilt

How to change sample rate properly in Avfoundation

放肆的年华 提交于 2019-12-12 11:21:15
问题 I have done this simple program. what it does is it just record and play back the buffers simultaneously. Everything works fine if the sample rate is 44100 hz but if I change the sample rate to 16000 or 8000, it doesn't producing any sound at all or may be some white noise which is not audiable.Why is this happening? How can I record with different sample rate? Following code I have tried: import UIKit import AVFoundation class ViewController: UIViewController { var engine = AVAudioEngine()

Error recording voice at16000 khz 16bit mono little endian wav file in android device [duplicate]

狂风中的少年 提交于 2019-12-11 11:51:52
问题 This question already exists : Closed 7 years ago . Possible Duplicate: how to convert or record .wav file in 16khz 16bit mono little-endian? I want to implement audio recording from an android device at 16000 khz 16bit mono little endian wav file. I had implemented the logic in android like this. I'm using one class name as extaudiorecorder. public class ExtAudioRecorder { private final static int[] sampleRates = {44100, 22050, 11025, 16000}; public static ExtAudioRecorder getInstanse