question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Manage different sampling rate files

See original GitHub issue

I realized that when I generate files from different sampling rate audio files, it keeps the default 44,1kHz, is it expected behavior ? I have 16kHz files for background and 44.1kHz files for foreground, I thought it would generate files with the lowest sample rate. I am now using sc.sr = 16000. If it is expected behavior, sorry and just close the issue please.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
justinsalamoncommented, Feb 17, 2020

Raising a warning is an option, though I’m a little concerned it will result in a very large number of warnings when working with a heterogenous set of foreground sounds with different sampling rates.

I think the main issue right now is that the sampling rate parameter is “hidden” because it’s not set in the constructor of the Scaper object and is generally not very well documented. I think the best way to address this is via #60, i.e. moving sr (as well as a few more parameters) into the constructor of the Scaper object with a proper docstring. This way, it will be visible and clearly stated that all events will be resampled to the provided sr, so hopefully will avoid confusion around this moving forward.

Closing this issue out in favor of #60.

0reactions
turpaultncommented, Feb 29, 2020

Thank you for the recommendation. I’ll try to find a way to do that then.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Change the Sample Rate of Your Audio - Voices
You can change the audio sampling rate of your spot in the Export Settings window (File > Export > Adobe Media Encoder). In...
Read more >
Sample Rates and Audio Sampling: A Guide for Beginners
You can easily convert an audio file into a different sample rate using Adobe Audition. First, check what sample rate the sound card...
Read more >
Data set with different sampling rate || how to handle in Matlab?
Sampling vs. data rate, decimation (DDC) and interpolation (DUC) in ... Reading Audio Files and Plotting Time Domain and Frequency Domain ...
Read more >
Set the sample rate of a project in Logic Pro - Apple Support
Set the project sample rate​​ In Logic Pro, do one of the following: Choose File > Project Settings > Audio (or use the...
Read more >
Importing two different files with different sampling rate
txt format). These two files eventhough recording time(start to end) is same,sampling rate is different.One records 4 samples per sec.Other at 8 samples ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found