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

you would need to add code that records audio and then extracts the acoustic properties from the audio. #3

Open
liufsd opened this issue Mar 22, 2017 · 5 comments

Comments

@liufsd
Copy link

liufsd commented Mar 22, 2017

HI~
Great blog here.
http://machinethink.net/blog/tensorflow-on-ios/?utm_source=Swift_Developments&utm_medium=email&utm_campaign=Swift_Developments_Issue_79

And how to get a mp3 file's properties like your maleExample data ? as your said 'you would first need to convert the audio into these 20 acoustic features.'

@liufsd
Copy link
Author

liufsd commented Mar 22, 2017

i found this lib:
https://github.com/syedhali/EZAudio

A Core Graphics-based audio waveform plot capable of visualizing any float array as a buffer or rolling plot.

But when i test the audio waveform float array by use your ios demo

such as
0.062762,
0.103492,
0.081940,
0.074608,
0.068868,
0.101204,
0.102716,
0.089740,
0.076932,
0.106734,
0.138263,
0.152022,
0.128706,
0.110719,
0.149329,
0.143515,
0.122522,
0.157512,
0.175348,
0.140023,
0.099732,
0.156891,
0.095777,
0.138552,
0.111330,
0.163990,
0.153985,
0.101871,
0.133215,
0.103015,
0.158894,
0.120836,
0.156758,

but test result is female not male

Probability spoken by a male: 0.970215%
Prediction: male
Probability spoken by a male: 0.00568771%
Prediction: female

@hollance
Copy link
Owner

It's not enough to convert the audio to floats, you need to extract things like the mean frequency from this data. The blog post links to source code that does this. Unfortunately it is in the R language, which is a little weird.

@liufsd
Copy link
Author

liufsd commented Mar 25, 2017

HI~
“The blog post links to source code that does this.” which link ?
this "https://github.com/primaryobjects/voice-gender" ???

@hollance
Copy link
Owner

Yes. The code is in the file sound.R.

@parmarmanoj007
Copy link

can we get this R code in python??

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

No branches or pull requests

3 participants