Closed AndreasArvidsson closed 2 years ago
Tested this out on Windows 10 - Doesn't seem to have anything that would suggest operating system differences so I didn't bother to test on Linux.
Recording does well, training the data goes well on Random Forest so it should go well on the other SKLEARN models, Audionet training goes well. The one area I managed to find a discrepancy is with analyzing the data ( A -> M menu in settings flow )
So I replaced line 304 through line 314 in lib/test_data.py with this:
print( "Analysing..." )
true_wav_file_labels = []
predicted_wav_file_labels = []
for index, sound in enumerate(available_sounds):
if( sound in classifier.classes_ or ( MICROPHONE_SEPARATOR and sound.split( MICROPHONE_SEPARATOR )[0] in classifier.classes_ ) ):
# First sort the wav files by time
recordings_dir = os.path.join(RECORDINGS_FOLDER, sound )
wav_files = os.listdir(recordings_dir)
full_wav_files = []
print( "----- " + str(sound) + " -----" )
if MICROPHONE_SEPARATOR:
sound = sound.split( MICROPHONE_SEPARATOR )[0]
If you would be so kind to add this to the PR I will merge it :)
Updated test data as requested. Please try it out to make sure everything works before merging :)
Tested it out, seems to work just fine :)
Using the setting
MICROPHONE_SEPARATOR
the user can have multiple recorded noises with different names that will be combined on training as long as they have the same prefix and separator.eg:
MICROPHONE_SEPARATOR = "--"
pop--dpa
=>pop
pop--akg
=>pop