{
  "id": 207622,
  "title": "Faster inference with precomputed MFCCs",
  "url": "/competitions/rfcx-species-audio-detection/discussion/207622",
  "author_name": "",
  "post_date": "2020-12-30T15:49:09.612834200Z",
  "votes": 15,
  "comment_count": 2,
  "views": 0,
  "content": "<p>My inference pipeline was used to last more than <strong>2 hours</strong> when I was computing the <strong>MFCCs</strong> on the fly. This is due to the time took by <strong>librosa</strong> to read the <strong>60 s</strong> audios and the resampling step (sr = 32_000). </p>\n<p>By pre-computing the MFCCs, my inference time goes under <strong>10 mins</strong> ! I will be sharing  the datasets of those precomputed mffcs in this thread. Don't mind using them in your pipes.</p>\n<ul>\n<li><a href=\"https://www.kaggle.com/kneroma/kkiller-rfcx-test-mfcc-1-0400\" target=\"_blank\">MFCCs of the whole test set</a></li>\n<li><a href=\"https://www.kaggle.com/kneroma/kkiller-rfcx-test-mfcc-0000-0400\" target=\"_blank\">https://www.kaggle.com/kneroma/kkiller-rfcx-test-mfcc-0000-0400</a></li>\n<li><a href=\"https://www.kaggle.com/kneroma/kkiller-rfcx-test-mfcc-0400-0800\" target=\"_blank\">https://www.kaggle.com/kneroma/kkiller-rfcx-test-mfcc-0400-0800</a></li>\n<li><a href=\"https://www.kaggle.com/kneroma/kkiller-rfcx-test-mfcc-0800-1200\" target=\"_blank\">https://www.kaggle.com/kneroma/kkiller-rfcx-test-mfcc-0800-1200</a></li>\n<li><a href=\"https://www.kaggle.com/kneroma/kkiller-rfcx-test-mfcc-1200-1600\" target=\"_blank\">https://www.kaggle.com/kneroma/kkiller-rfcx-test-mfcc-1200-1600</a></li>\n<li><a href=\"https://www.kaggle.com/kneroma/kkiller-rfcx-test-mfcc-1600-2000\" target=\"_blank\">https://www.kaggle.com/kneroma/kkiller-rfcx-test-mfcc-1600-2000</a></li>\n</ul>\n<h3>Update 1 : MFCC computation code</h3>\n<p>If you ever modify any param on my  <a href=\"https://www.kaggle.com/kneroma/inference-tpu-rfcx-audio-detection-fast\" target=\"_blank\">inference kernel</a>, it can outdate the static mfcc datasets. So I'm releasing <a href=\"https://www.kaggle.com/kneroma/rfcx-faster-inference-with-precomputed-mfccs\" target=\"_blank\">my code for the mfccs computation here</a>.</p>",
  "messages": [
    {
      "id": "1132675",
      "postDate": "12/30/2020 15:49:09",
      "content": "<p>My inference pipeline was used to last more than <strong>2 hours</strong> when I was computing the <strong>MFCCs</strong> on the fly. This is due to the time took by <strong>librosa</strong> to read the <strong>60 s</strong> audios and the resampling step (sr = 32_000). </p>\n<p>By pre-computing the MFCCs, my inference time goes under <strong>10 mins</strong> ! I will be sharing  the datasets of those precomputed mffcs in this thread. Don't mind using them in your pipes.</p>\n<ul>\n<li><a href=\"https://www.kaggle.com/kneroma/kkiller-rfcx-test-mfcc-1-0400\" target=\"_blank\">MFCCs of the whole test set</a></li>\n<li><a href=\"https://www.kaggle.com/kneroma/kkiller-rfcx-test-mfcc-0000-0400\" target=\"_blank\">https://www.kaggle.com/kneroma/kkiller-rfcx-test-mfcc-0000-0400</a></li>\n<li><a href=\"https://www.kaggle.com/kneroma/kkiller-rfcx-test-mfcc-0400-0800\" target=\"_blank\">https://www.kaggle.com/kneroma/kkiller-rfcx-test-mfcc-0400-0800</a></li>\n<li><a href=\"https://www.kaggle.com/kneroma/kkiller-rfcx-test-mfcc-0800-1200\" target=\"_blank\">https://www.kaggle.com/kneroma/kkiller-rfcx-test-mfcc-0800-1200</a></li>\n<li><a href=\"https://www.kaggle.com/kneroma/kkiller-rfcx-test-mfcc-1200-1600\" target=\"_blank\">https://www.kaggle.com/kneroma/kkiller-rfcx-test-mfcc-1200-1600</a></li>\n<li><a href=\"https://www.kaggle.com/kneroma/kkiller-rfcx-test-mfcc-1600-2000\" target=\"_blank\">https://www.kaggle.com/kneroma/kkiller-rfcx-test-mfcc-1600-2000</a></li>\n</ul>\n<h3>Update 1 : MFCC computation code</h3>\n<p>If you ever modify any param on my  <a href=\"https://www.kaggle.com/kneroma/inference-tpu-rfcx-audio-detection-fast\" target=\"_blank\">inference kernel</a>, it can outdate the static mfcc datasets. So I'm releasing <a href=\"https://www.kaggle.com/kneroma/rfcx-faster-inference-with-precomputed-mfccs\" target=\"_blank\">my code for the mfccs computation here</a>.</p>",
      "rawMarkdown": "My inference pipeline was used to last more than **2 hours** when I was computing the **MFCCs** on the fly. This is due to the time took by **librosa** to read the **60 s** audios and the resampling step (sr = 32_000). \n\nBy pre-computing the MFCCs, my inference time goes under **10 mins** ! I will be sharing  the datasets of those precomputed mffcs in this thread. Don't mind using them in your pipes.\n\n* [MFCCs of the whole test set](https://www.kaggle.com/kneroma/kkiller-rfcx-test-mfcc-1-0400)\n* https://www.kaggle.com/kneroma/kkiller-rfcx-test-mfcc-0000-0400\n* https://www.kaggle.com/kneroma/kkiller-rfcx-test-mfcc-0400-0800\n* https://www.kaggle.com/kneroma/kkiller-rfcx-test-mfcc-0800-1200\n* https://www.kaggle.com/kneroma/kkiller-rfcx-test-mfcc-1200-1600\n* https://www.kaggle.com/kneroma/kkiller-rfcx-test-mfcc-1600-2000\n\n### Update 1 : MFCC computation code\n\nIf you ever modify any param on my  [inference kernel](https://www.kaggle.com/kneroma/inference-tpu-rfcx-audio-detection-fast), it can outdate the static mfcc datasets. So I'm releasing [my code for the mfccs computation here](https://www.kaggle.com/kneroma/rfcx-faster-inference-with-precomputed-mfccs).",
      "votes": null
    },
    {
      "id": "1143277",
      "postDate": "01/07/2021 20:25:19",
      "content": "<p>Try without resampling ;)</p>",
      "rawMarkdown": "Try without resampling ;)",
      "votes": null
    },
    {
      "id": "1161171",
      "postDate": "01/20/2021 11:45:04",
      "content": "<p>Hey so just to check as this is my first comp where you have the test data given to you. Is it not sufficient to do inference elswehere and just submit a submission.csv?</p>",
      "rawMarkdown": "Hey so just to check as this is my first comp where you have the test data given to you. Is it not sufficient to do inference elswehere and just submit a submission.csv?",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1143277,
      "author_name": "cpmpml",
      "author_url": "",
      "post_date": "01/07/2021 20:25:19",
      "content": "<p>Try without resampling ;)</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1161171,
      "author_name": "alexandersoare",
      "author_url": "",
      "post_date": "01/20/2021 11:45:04",
      "content": "<p>Hey so just to check as this is my first comp where you have the test data given to you. Is it not sufficient to do inference elswehere and just submit a submission.csv?</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1132675": "My inference pipeline was used to last more than **2 hours** when I was computing the **MFCCs** on the fly. This is due to the time took by **librosa** to read the **60 s** audios and the resampling step (sr = 32_000). \n\nBy pre-computing the MFCCs, my inference time goes under **10 mins** ! I will be sharing  the datasets of those precomputed mffcs in this thread. Don't mind using them in your pipes.\n\n* [MFCCs of the whole test set](https://www.kaggle.com/kneroma/kkiller-rfcx-test-mfcc-1-0400)\n* https://www.kaggle.com/kneroma/kkiller-rfcx-test-mfcc-0000-0400\n* https://www.kaggle.com/kneroma/kkiller-rfcx-test-mfcc-0400-0800\n* https://www.kaggle.com/kneroma/kkiller-rfcx-test-mfcc-0800-1200\n* https://www.kaggle.com/kneroma/kkiller-rfcx-test-mfcc-1200-1600\n* https://www.kaggle.com/kneroma/kkiller-rfcx-test-mfcc-1600-2000\n\n### Update 1 : MFCC computation code\n\nIf you ever modify any param on my  [inference kernel](https://www.kaggle.com/kneroma/inference-tpu-rfcx-audio-detection-fast), it can outdate the static mfcc datasets. So I'm releasing [my code for the mfccs computation here](https://www.kaggle.com/kneroma/rfcx-faster-inference-with-precomputed-mfccs).",
    "1143277": "Try without resampling ;)",
    "1161171": "Hey so just to check as this is my first comp where you have the test data given to you. Is it not sufficient to do inference elswehere and just submit a submission.csv?"
  },
  "source": "meta"
}