Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request to contribute an example about audio time-frequency analysis using tfjs #1338

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

j622amilah
Copy link

Hello,

I would like to contribute an example on how to perform time, frequency, and time & frequency (spectrogram) analysis on audio data using the tensorflow.js library. The index.html file contains the required functions with simple straightforward explanations. JQuery is used to fetch a single audio file, and Plotly.js is used to plot the audio data in time, frequency, and time & frequency (spectrogram).

I understand that you would like to have only examples of high quality, I have looked at the GitHub Issues section and I have already a signed Google agreement. I would be happy to make any changes to this example if it is found insufficient, and/or would be happy to share it in the GitHub Issues if it is not selected.

My intentions in creating this audio processing application is to ultimately perform audio-to-text analysis in an end-to-end webapp, I intend to update and continue improving these functions in more advanced applications (ie: parallel processing with webworker, etc).

All the best,
Jamilah Foucher

Copy link

google-cla bot commented Sep 6, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@j622amilah
Copy link
Author

Hi, I made a pull request to contribute some code about audio pre-processing September 6, 2024 and I have not heard back. Is it possible for someone respond to the pull request to reject/accept the code? If the code is rejected, I do not mind sharing it is the comment section (as was written on your page). Also, I found an error with the calculation of the standard deviation. The standard deviation calculation does not influence the main part of the code, but below is the correction.

`async function std(arr) {
const mu = await arr.reduce((accumulator, currentValue) => accumulator + currentValue, 0) / arr.length;
console.log('mu: ', mu);

// ------------------------
// const arr1 = await arr.map((val, ind) => { return Math.pow(val - mu, 2); });
// console.log('arr1: ', arr1);

// const variance = arr1.reduce((accumulator, currentValue) => accumulator + currentValue, 0) / arr.length;
// console.log('variance: ', variance);

// OR

const variance = arr.reduce((accumulator, currentValue) => accumulator + Math.pow(currentValue - mu, 2), 0) / arr.length;
console.log('variance: ', variance);
// ------------------------

const out = await Math.sqrt( variance );
console.log('out: ', out);

return out;

}`

Hope to hear back from someone soon. If I do not hear back in a week, I will close/cancel the pull request. I guess the contribution was not up to the standards that you require, and you could not tell me directly.

Best,
Jamilah Foucher

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant