I have a need to convert audio samples from 11025 and 22050 to 44100; I'm looking for the fastest and best sounding conversion routine. I require that the answer be given in pure Java, without the need for external routines or libraries. The source is an array of short values representing left and right channels, interleaved like so LRLRLRLR
I've heard that gaussian transformation is the best, but it is a cpu killer.
Update
To add more detail, I would like a mix between best and fastest. The answer would give great sounding audio suitable for near real-time communication.
Update 2
I'm looking for some short code examples for this one, should be ez points for you audio guru's
Fastest and most efficient upsampling routine for Audio in Java
2k views Asked by Paul Gregoire At
2
There are 2 answers
0
BarsMonster
On
Well, it is hard to resample it slow enough so that it is not realtime :-) One of the best & still fast solutions is to do forward FFT, and then do reverse FFT with any sample rate you need.
You may implement this on your own, or copy & paste any FFT implementation.
This might work like 100x realtime or faster, not sure you need 1000x faster (in this case you can go for linear or bicubic interpolation) :-)
Related Questions in JAVA
- I need the BIRT.war that is compatible with Java 17 and Tomcat 10
- Creating global Class holder
- No method found for class java.lang.String in Kafka
- Issue edit a jtable with a pictures
- getting error when trying to launch kotlin jar file that use supabase "java.lang.NoClassDefFoundError"
- Does the && (logical AND) operator have a higher precedence than || (logical OR) operator in Java?
- Mixed color rendering in a JTable
- HTTPS configuration in Spring Boot, server returning timeout
- How to use Layout to create textfields which dont increase in size?
- Function for making the code wait in javafx
- How to create beans of the same class for multiple template parameters in Spring
- How could you print a specific String from an array with the values of an array from a double array on the same line, using iteration to print all?
- org.telegram.telegrambots.meta.exceptions.TelegramApiException: Bot token and username can't be empty
- Accessing Secret Variables in Classic Pipelines through Java app in Azure DevOps
- Postgres && statement Error in Mybatis Mapper?
Related Questions in AUDIO
- how to play a sounds in c# forms?
- Winsound not working isn't working at all
- Ringing noise overpowering voice / Recording audio with Max 9814 microphone on Raspberry pi pico using ADC Pin / Circuitpython
- How to take first x seconds of Audio from a wav file read from AWS S3 as binary stream using Python?
- gluon attach audio doesn't play any sound on android
- Implementing trim and fade filters with ffmpeg - MP3
- Unable to set device connection state as INPUT device type is none
- Is there a way to differentiate music and talking from a video?
- How to concatenate audio tracks and make them start a certain moment using Python?
- Combine two audio in different languages to one natural sounding
- STM32 - Serial Audio Interface (SAI) - dual data line transmit possible?
- playing mp3 downloaded via curllib gets cut short
- How to stream PCM audio to a speakers both on mac and linux in Node.js?
- Scikit-Maad -From the function rois.find_rois_cwt, I want to get a csv of the outputs so I can do my own analysis on it
- Using MediaPlayer slows down SoundPool sound effect
Related Questions in RESAMPLING
- How to use rep_slice_sample() to randomly sample within groups of varying observation number
- why is there a new date out of my data range after resample in python
- Time Series Cross Validation Warning (tidymodels, fit_resamples)
- Is there a way to resample a raster to a lower resolution using a weighted average of constituent pixels?
- Positional Encoding in Transformer Model for time-series
- Tidymodels and Imbalanced datasets - Subsampling when resampling
- How Create Python Cluster Sample by Group ID Without Lambda Function?
- How can down-sampling periodic time-series data without loosing general pattern for characterization analysis?
- Resampling with date and hour ranges
- Nonparametric way to perform ANOVA of linear mixed model and power calcualtion
- Interpolating time-series with the date format
- Why does sampling without replacement in my function just duplicate my output?
- gdalwarp setting xres and yres
- Optimize metrics for Fraud Detection Imbalanced Data
- Hypothesis testing - Newbie blockers
Related Questions in SAMPLE-RATE
- Getting memory information from Qiskit Runtime service- Sampler
- Approaching sound index by multiplying second and sample rate isn't accurate
- vosk transcription not loading, excessively long loading time that does not conclude
- Is there a way to access an After Effects audio layer's sample rate or waveform data?
- Changing the sample frequency of the BMM150 magnetometer on the Nano 33 BLE Sense Rev2
- Calculating Fps-shift in two videos
- How to set sample rate in a VST3 plugin
- How to know the byte offset of a specific CBR MP3 frame?
- Getting only 100sample/second from MPU6050 through Raspberry pi Pico
- Divide by zero and adjust sample rate of sin(1/x)
- Flutter Sensors_plus package: Adjusting sample rate of sensordata for mobile web application
- Movesense HR Sensor - Acceleration data noise level at high vs low sample frequency
- Unity animation not playing at low sample rate
- Is there a limit of sample rate of accelerometer on android?
- I want to extract a sample from a .wav audio file, how can I do that?
Related Questions in NEAR-REAL-TIME
- Load data from a near real time Bigquery table to another near real time table in GCP
- Real Time Cluster Log Delivery in a Databricks Cluster
- Near real time streaming data from 100s customer to Google Pub/Sub to GCS
- Using Snowpipe - What's the best practice for loading small files. eg. Thousands of 4K files per day?
- Reduce TTFB on PHP empty file
- why is spark streaming called near real time?
- Lucene near real time search
- How do I invoke executable for Azure real time analytics?
- Real Time Notification for Angular 2 web app with asp.net web API back end
- online recommendation using mahout
- Solr suggester not available in near real time
- Xmpp Vs Websocket
- Solr vs Elasticsearch on near real time search
- how can i use spring framework with lucene
- Lucene Near Realtime Search
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
you can (ultimately) just use a fir after filling every other sample with 0s - you're upsampling by 2 or 4. this will be plenty fast for realtime. audio quality will be fine for most applications.