you would need to add code that records audio and then extracts the acoustic properties from the audio.
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.'
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
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.
HI~ “The blog post links to source code that does this.” which link ? this "https://github.com/primaryobjects/voice-gender" ???
Yes. The code is in the file sound.R.
can we get this R code in python??