TensorFlow-iOS-Example icon indicating copy to clipboard operation
TensorFlow-iOS-Example copied to clipboard

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

Open liufsd opened this issue 8 years ago • 5 comments

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 avatar Mar 22 '17 13:03 liufsd

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

liufsd avatar Mar 22 '17 15:03 liufsd

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.

hollance avatar Mar 24 '17 17:03 hollance

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

liufsd avatar Mar 25 '17 02:03 liufsd

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

hollance avatar Mar 26 '17 11:03 hollance

can we get this R code in python??

parmarmanoj007 avatar Aug 16 '17 06:08 parmarmanoj007