| 1 | /* Sound_to_MFCC.cpp |
| 2 | * |
| 3 | * Copyright (C) 1993-2017 David Weenink |
| 4 | * |
| 5 | * This code is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; either version 2 of the License, or (at |
| 8 | * your option) any later version. |
| 9 | * |
| 10 | * This code is distributed in the hope that it will be useful, but |
| 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | * General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this work. If not, see <http://www.gnu.org/licenses/>. |
| 17 | */ |
| 18 | |
| 19 | /* |
| 20 | djmw 20010410 |
| 21 | djmw 20020813 GPL header |
| 22 | */ |
| 23 | |
| 24 | #include "Sound_to_MFCC.h"cxx . . $ `<file>/dwtools/Sound_to_MFCC.h`/ |
| 25 | #include "Sound_and_Spectrogram_extensions.h"cxx . . $ `<file>/dwtools/Sound_and_Spectrogram_extensions.h`/ |
| 26 | |
| 27 | autoMFCCcxx . . $ autoMFCC# Sound_to_MFCCcxx . . $ Sound_to_MFCC(924d2b2502cbf775). (Soundcxx . . $ Sound# me, integercxx . . $ integer# numberOfCoefficients, double analysisWidth, double dt, double f1_mel, double fmax_mel, double df_mel) { |
| 28 | try { |
| 29 | autoMelSpectrogramcxx . . $ autoMelSpectrogram# mf = Sound_to_MelSpectrogramcxx . . $ Sound_to_MelSpectrogram(528140ad90e7d0ad). (me, analysisWidth, dt, f1_mel, fmax_mel, df_mel); |
| 30 | autoMFCCcxx . . $ autoMFCC# mfcc = MelSpectrogram_to_MFCCcxx . . $ MelSpectrogram_to_MFCC(402316c77bc09e28). (mf.getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), numberOfCoefficients); |
| 31 | return mfcccxx . . $ autoSomeThing#autoSomeThing(b79141a71f7bc86f).; |
| 32 | } catch (MelderErrorcxx . . $ MelderError#) { |
| 33 | Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (me, U": no MFCC created."); |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | /* End of file Sound_to_MFCC.cpp */ |