diff options
author | matthewsotoudeh <matthewsot@outlook.com> | 2016-09-05 18:08:19 -0700 |
---|---|---|
committer | matthewsotoudeh <matthewsot@outlook.com> | 2016-09-05 18:08:19 -0700 |
commit | 6b8d632411145d135bd9491b7234e316e53d3185 (patch) | |
tree | 109f62d638538d6c4528e33abaab46d2629d1d2f | |
parent | d87d738c77db7f5144009fda39f95b17abc1514d (diff) |
added licensing information & general README
-rw-r--r-- | .gitattributes | 63 | ||||
-rw-r--r-- | License | 1 | ||||
-rw-r--r-- | README.md | 23 |
3 files changed, 86 insertions, 1 deletions
diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1ff0c42 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,63 @@ +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +* text=auto + +############################################################################### +# Set default behavior for command prompt diff. +# +# This is need for earlier builds of msysgit that does not have it on by +# default for csharp files. +# Note: This is only used by command line +############################################################################### +#*.cs diff=csharp + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just uncomment the entries below +############################################################################### +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +############################################################################### +# behavior for image files +# +# image files are treated as binary by default. +############################################################################### +#*.jpg binary +#*.png binary +#*.gif binary + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain @@ -0,0 +1 @@ +Feel free to use this for personal projects, but if you would like to redistribute this code or use it in a project shared with others please ask me over email at matthewsot@outlook.com :)
\ No newline at end of file @@ -1,2 +1,23 @@ # mfcc-dotnet -An FSharp/.NET library for MFCC audio feature extraction +An FSharp/.NET library for MFCC audio feature extraction. + +# Implementation +This MFCC implementation is partially based off of the guide at [Practical Cryptography](http://practicalcryptography.com/miscellaneous/machine-learning/guide-mel-frequency-cepstral-coefficients-mfccs/#computing-the-mel-filterbank). + +The specific steps it takes are: +1. Compute a Hamming window using MathDotNet and apply it to the samples +2. Perform an in-place FFT on the windowed samples using MathDotNet, then take the magnitude of each of the FFT outputs +3. Compute the MFCC filterbank (or read from cached version) +4. Apply the filterbank +5. Log the outputs +6. Run a DCT on the logged outputs + +# Performance +I have tried to keep optimization in mind, but no promises are made regarding the speed or efficiency of the code. + +Some optimizations include: +- The filterbank is cached after it's first created +- Filters are applied and summed as one, instead of applied separately and summed afterwards +- You can uncomment a line to simply sum the real and imaginary FFT outputs instead of taking the absolute value of the sum of squares, which will result in a small performance increase (though might impact accuracy). + +PRs are also very much appreciated if you spot anything else that should be optimized!
\ No newline at end of file |