Questions tagged [sample-rate]

157 questions
50
votes
3 answers

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

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…
Alve
  • 1,315
  • 2
  • 17
  • 16
34
votes
7 answers

Change sample rate of AudioContext (getUserMedia)

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; …
f.lorenzo
  • 1,146
  • 2
  • 11
  • 24
30
votes
1 answer

AudioTrack samplerate inconsistencies

Using AudioTrack for playback, I sometimes need to resample audio that do not conform to the sample rates supported by AudioTrack. In doing so, I need to determine the maximum sample rate supported by AudioTrack, under the current device, under the…
initramfs
  • 8,275
  • 2
  • 36
  • 58
19
votes
5 answers

How can I detect these audio abnormalities?

iOS has an issue recording through some USB audio devices. It cannot be reliably reproduced (happens every 1 in ~2000-3000 records in batches and silently disappears), and we currently manually check our audio for any recording issues. It results in…
Alastair Stuart
  • 4,165
  • 3
  • 36
  • 33
14
votes
5 answers

Android AudioRecord - Won't Initialize 2nd time

Hej, im currently trying to get AudioRecord to work. Because I need it in a bigger project. But it seems to mess up a lot. I have been trying alot of things, so I went back to basic when I traced this bug. I am using my Samsung Galaxy S as my…
Anders Metnik
  • 6,096
  • 7
  • 40
  • 79
14
votes
5 answers

Check audio's sample rate using python

I have over a thousand audio files, and I want to check if their sample rate is 16kHz. To do it manually would take me forever. Is there a way to check the sample rate using python?
ash
  • 2,902
  • 3
  • 19
  • 34
11
votes
3 answers

How to calculate audio file size?

You have 30 seconds audio file sampled at a rate of 44.1 KHz and quantized using 8 bits ; calculate the bit rate and the size of mono and stereo versions of this file ؟؟
Osama Al-far
  • 427
  • 3
  • 10
  • 24
9
votes
1 answer

AvaudioEngine - Record voice at specific sample rate AvaudioEngine for Analysis

we are working on a project which records voice from an external microphone. For analysis purposes, we need to have a sample rate of about 5k Hz. We are using AvAudioEngine to record a voice. We know Apple devices want able to record at a specific…
Bhavin Vaghela
  • 654
  • 1
  • 5
  • 19
9
votes
1 answer

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

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…
Ivan Vučica
  • 9,529
  • 9
  • 60
  • 111
7
votes
1 answer

how to use sox to compress mp3?

I'd like to reduce the file size of some mp3 audios with sox. I think I can reduce stereo to only 1 channel (i.e. mono), reduce the sample rate and reduce the bit-depth. I find it seems sox can do none of that. Is this true or did I have done it…
RNA
  • 146,987
  • 15
  • 52
  • 70
7
votes
3 answers

Setting sample rate on AUHAL

I'm using Audio Unit Framework to develop a VOIP app on mac os x. In my program, I set up an input AUHAL and use the default stream format (44.1kHz,32bit/channel) to capture the audio from mic. In this case, my program works fine. Here is the…
Jun Liu
  • 133
  • 1
  • 8
6
votes
2 answers

How to change sample rate properly in Avfoundation

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…
Satizh J
  • 307
  • 4
  • 14
6
votes
1 answer

sox file.wav -r 10 file.dat

What does a sample of a audio file contain ? When I run the command "sox file.wav -r 10 file.dat", the output is something like ; Sample Rate 10 ; Channels 2 0 0.00085449219 -0.0007019043 0.1 0.01348877 …
Prakash Raman
  • 13,319
  • 27
  • 82
  • 132
6
votes
1 answer

iOS: Audio Units: setting arbitrary sample rate

Can I set any sample rate I want? What are the restrictions? How about the hardware sample rate? And once that is set, what is the restriction on the internal sample rates passed between units? I'm guessing that the actual hardware rate may have…
P i
  • 29,020
  • 36
  • 159
  • 267
6
votes
1 answer

How to set audio sample rate on AVCaptureSession?

I am using AVCaptureSession to record video and audio into sample buffers using AVCaptureVideoDataOutput and AVCaptureAudioDataOutput. The default audio sample rate for the iPhone (4 and 4S) is 44100Hz. I would like to set this to 48000Hz however…
Avner
  • 5,791
  • 2
  • 29
  • 33
1
2 3
10 11