Questions tagged [sample-rate]

157 questions
0
votes
4 answers

How to accurately sample in python

At work, I have a need: to do sampling every 0.08 seconds in 10 seconds. I use while loop but it fails. import time start_t =time.time() while time.time() -start_t <=10: if float(time.time() -start_t) % float(0.08) == 0: """do sample…
0
votes
2 answers

Change sample rate of audiocard with WasapiOut Naudio

I want to chose a specific sample rate for my audio card programmatically in c# with Naudio. My output is a WasapiOut in exclusive mode. I already tried a lot of things, but nothing worked and I've searched everywhere and I only found this : How to…
Neb
  • 1
  • 4
0
votes
1 answer

How do I compute the duration of an audio clip from a byte array?

I am synthesising speech using the Google cloud APIs. I have the following information about the speech synthesise response. Sample rate: 8000 Hz Audio format: MP3 Length of the byte array The response from the API is a byte array. Given this…
Vino
  • 2,111
  • 4
  • 22
  • 42
0
votes
0 answers

Replace cordova-plugin-media with cordova-plugin-media-with-compression

I am new to ionic and I want to record a file in wav format using cordova-plugin-media-with-compression. Unfortunately, in my project cordova-plugin-media is used which doesnt support 'startRecordWithCompression()' method hence i have to change the…
0
votes
0 answers

Working out sample rate and bit depth of aiff audio from file size

I need some help with Maths/logic here. Working with aif files. I have written the following: LnByte = FileLen(ToCheck) 'Returns Filesize in Bytes LnBit = LnByte * 8 …
SamBee
  • 3
  • 3
0
votes
1 answer

Bit rate and sample rate for ogv movie to be played in rpg maker vx ace

I've made a movie for RPG Maker XV ace with just music in the background. The program only allows .ogv movies (OGG, THEORA) to be played. I have no problem with the video quality, however, the sound is distorted and "jumps" (like when we were…
0
votes
0 answers

correct way to download a mp4 [Audio only] file as a mp3 file via php

I am asking this question because i found it impossible as far my knowledge stands. However i believe here on stackoverflow a lot of genius persons visits so maybe someone can give a good advice / trick. My problem is, I am downloading a audio/mp4…
Kapil
  • 115
  • 3
  • 17
0
votes
0 answers

Unknown sample rate/Line Unavailable - Java

I am working on a Java based Application that requires to record sound from Mic. Following is my code: audioFormat = new AudioFormat(8000, 16, 1, true, false); targetInfo = new DataLine.Info(TargetDataLine.class, audioFormat); try…
0
votes
0 answers

Why saving of 32-bit sample rate, PCM float byte[] to wav file creates distortion/crackling?

I have the following two function that loads any given WAV file into a byte array and gets the format (i.e. AudioFormat) of a given WAV file respectively: private byte[] getAudioData(String wavPath) throws IOException, UnsupportedAudioFileException…
Code Doggo
  • 2,146
  • 6
  • 33
  • 58
0
votes
1 answer

How to control sampling in Opentracing

I am new to opentracing and was trying it out. Wanted to know is there a way to control sample rate and yes then how? thanks, Sandy
Sandy
  • 2,253
  • 6
  • 24
  • 33
0
votes
1 answer

Why does not program cost 1 sec when it plays 44100 samples with 44100 sample rate by using PyAudio?

import pyaudio import numpy as np import time RATE=44100 pa = pyaudio.PyAudio() stream = pa.open(format=pyaudio.paFloat32, channels=1, rate=RATE, …
Roger
  • 91
  • 2
  • 4
0
votes
1 answer

Audiocontext convert the sample rate from 44.1KHz to 8KHz

I'm trying to stream the microphone audio, but I noticed that the audio is recorded At 44,1KHz and the device to which I send the data only supports 8KHz audio data. Is there a way to convert the sample rate by using JavaScript?
user8093442
0
votes
0 answers

Choosing sampling rate

I have some raw accelerometer data which were collected unevenly spaced time at sampling rate between 200 and 220 Hz. I would like to analyze the data using stationary methods so I applied matlab anti-aliasing function resample on the raw data. Here…
0
votes
0 answers

Extracting sample rate from spectrogram

I have a set of spectrograms as numpy arrays. Is there any way that I could find their sample rates? I don't have any other information, for example the original sound files.
Qubix
  • 4,161
  • 7
  • 36
  • 73
0
votes
0 answers

Sample Rate Conversion at Runtime

So, i had this brilliant idea to write something to parse .MOD files. (Tracker music) In order to attempt playing them back as a practice exercise to myself for C#. Now i came all the way to actually playing it back, but ran into an issue. The audio…
Smileynator
  • 677
  • 8
  • 24