{
  "id": 496460,
  "title": "Is sampling rate 32kHz?",
  "url": "/competitions/birdclef-2024/discussion/496460",
  "author_name": "",
  "post_date": "2024-04-21T07:35:39.603692900Z",
  "votes": 9,
  "comment_count": 6,
  "views": 0,
  "content": "<p>In \"Dataset Description\",<br>\n\"The training data consists of short recordings of individual bird calls generously uploaded by users of xenocanto.org. <br>\nThese files have been downsampled to 32 kHz where applicable to match the test set audio and converted to the ogg format.\"<br>\nBut, librosa.load returns a sampling rate of 22050.<br>\nAnd if I take the first row of train_metadata.csv, asbfly/XC134896.ogg, for example, the data length is 603073.<br>\n603073 is 27.3 sec if sampling rate is 22050, 18.8 sec if sampling rate is 32kHz.<br>\nLooking at <a href=\"https://xeno-canto.org/134896\" target=\"_blank\">https://xeno-canto.org/134896</a>, the recording data is about 27 sec, and it sounds similar if I play XC134896.ogg at 22050Hz.<br>\nSo, I think the sampling rate of train data is 22050Hz.<br>\nIf the sampling rate of training data is 22050 and that of test data is 32kHz, we should resample one of these.<br>\nBut is the sampling rate of test data really 32kHz?</p>",
  "messages": [
    {
      "id": "2765555",
      "postDate": "04/21/2024 07:35:39",
      "content": "<p>In \"Dataset Description\",<br>\n\"The training data consists of short recordings of individual bird calls generously uploaded by users of xenocanto.org. <br>\nThese files have been downsampled to 32 kHz where applicable to match the test set audio and converted to the ogg format.\"<br>\nBut, librosa.load returns a sampling rate of 22050.<br>\nAnd if I take the first row of train_metadata.csv, asbfly/XC134896.ogg, for example, the data length is 603073.<br>\n603073 is 27.3 sec if sampling rate is 22050, 18.8 sec if sampling rate is 32kHz.<br>\nLooking at <a href=\"https://xeno-canto.org/134896\" target=\"_blank\">https://xeno-canto.org/134896</a>, the recording data is about 27 sec, and it sounds similar if I play XC134896.ogg at 22050Hz.<br>\nSo, I think the sampling rate of train data is 22050Hz.<br>\nIf the sampling rate of training data is 22050 and that of test data is 32kHz, we should resample one of these.<br>\nBut is the sampling rate of test data really 32kHz?</p>",
      "rawMarkdown": "In \"Dataset Description\",\n\"The training data consists of short recordings of individual bird calls generously uploaded by users of xenocanto.org. \nThese files have been downsampled to 32 kHz where applicable to match the test set audio and converted to the ogg format.\"\nBut, librosa.load returns a sampling rate of 22050.\nAnd if I take the first row of train_metadata.csv, asbfly/XC134896.ogg, for example, the data length is 603073.\n603073 is 27.3 sec if sampling rate is 22050, 18.8 sec if sampling rate is 32kHz.\nLooking at https://xeno-canto.org/134896, the recording data is about 27 sec, and it sounds similar if I play XC134896.ogg at 22050Hz.\nSo, I think the sampling rate of train data is 22050Hz.\nIf the sampling rate of training data is 22050 and that of test data is 32kHz, we should resample one of these.\nBut is the sampling rate of test data really 32kHz?",
      "votes": null
    },
    {
      "id": "2765592",
      "postDate": "04/21/2024 08:13:19",
      "content": "<p>Hello,</p>\n<p>By default, librosa loads files with a sampling rate of 22050, if you want to load the file with the original sampling rate then specify in the load: sr = None</p>\n<p><code>\ny, sr = librosa.load(audio_filename,sr=None,mono=False,duration =90)\n</code></p>\n<p>You will get the sampling of the file in the variable sr.</p>\n<p>Thierry</p>",
      "rawMarkdown": "Hello,\n\nBy default, librosa loads files with a sampling rate of 22050, if you want to load the file with the original sampling rate then specify in the load: sr = None\n\n`\ny, sr = librosa.load(audio_filename,sr=None,mono=False,duration =90)\n`\n\nYou will get the sampling of the file in the variable sr.\n\nThierry",
      "votes": null
    },
    {
      "id": "2765635",
      "postDate": "04/21/2024 08:40:57",
      "content": "<p>Thanks.<br>\nI am sorry I did not read the librosa document thoroughly.</p>",
      "rawMarkdown": "Thanks.\nI am sorry I did not read the librosa document thoroughly.",
      "votes": null
    },
    {
      "id": "2772157",
      "postDate": "04/24/2024 15:02:55",
      "content": "<p>I am glad the question has already been answered. The sampling rate is variable (it can be 48kHz in some sites or 44kHz in others or something else altogether).</p>",
      "rawMarkdown": "I am glad the question has already been answered. The sampling rate is variable (it can be 48kHz in some sites or 44kHz in others or something else altogether).",
      "votes": null
    },
    {
      "id": "2772308",
      "postDate": "04/24/2024 16:41:33",
      "content": "<p>Hi, what you say is a bit surprising given the data tab read:</p>\n<blockquote>\n  <p>train_audio/  […] These files have been downsampled to 32 kHz where applicable to match the test set audio and converted to the ogg format. </p>\n</blockquote>\n<p>From this one can easily assume that test data is downsampled at 32 kHz.</p>\n<p>Now you say something different. Are you discussing the original sampling rate or the sampling rate of the test data here?</p>",
      "rawMarkdown": "Hi, what you say is a bit surprising given the data tab read:\n\n> train_audio/  [...] These files have been downsampled to 32 kHz where applicable to match the test set audio and converted to the ogg format. \n\nFrom this one can easily assume that test data is downsampled at 32 kHz.\n\nNow you say something different. Are you discussing the original sampling rate or the sampling rate of the test data here?",
      "votes": null
    },
    {
      "id": "2772417",
      "postDate": "04/24/2024 18:02:17",
      "content": "<p>Yes, that's the original sampling rate. For the data in this competition, we resampled all recordings to 32 kHz to be consistent with previous editions.</p>",
      "rawMarkdown": "Yes, that's the original sampling rate. For the data in this competition, we resampled all recordings to 32 kHz to be consistent with previous editions.",
      "votes": null
    },
    {
      "id": "2772456",
      "postDate": "04/24/2024 18:22:35",
      "content": "<p>thanks for the confirmation.</p>",
      "rawMarkdown": "thanks for the confirmation.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2765592,
      "author_name": "thierryneusius",
      "author_url": "",
      "post_date": "04/21/2024 08:13:19",
      "content": "<p>Hello,</p>\n<p>By default, librosa loads files with a sampling rate of 22050, if you want to load the file with the original sampling rate then specify in the load: sr = None</p>\n<p><code>\ny, sr = librosa.load(audio_filename,sr=None,mono=False,duration =90)\n</code></p>\n<p>You will get the sampling of the file in the variable sr.</p>\n<p>Thierry</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 2765635,
      "author_name": "konomuabe",
      "author_url": "",
      "post_date": "04/21/2024 08:40:57",
      "content": "<p>Thanks.<br>\nI am sorry I did not read the librosa document thoroughly.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 2772157,
      "author_name": "wgbirds",
      "author_url": "",
      "post_date": "04/24/2024 15:02:55",
      "content": "<p>I am glad the question has already been answered. The sampling rate is variable (it can be 48kHz in some sites or 44kHz in others or something else altogether).</p>",
      "votes": null,
      "replies": [
        {
          "id": 2772308,
          "author_name": "cpmpml",
          "author_url": "",
          "post_date": "04/24/2024 16:41:33",
          "content": "<p>Hi, what you say is a bit surprising given the data tab read:</p>\n<blockquote>\n  <p>train_audio/  […] These files have been downsampled to 32 kHz where applicable to match the test set audio and converted to the ogg format. </p>\n</blockquote>\n<p>From this one can easily assume that test data is downsampled at 32 kHz.</p>\n<p>Now you say something different. Are you discussing the original sampling rate or the sampling rate of the test data here?</p>",
          "votes": null,
          "replies": [
            {
              "id": 2772417,
              "author_name": "stefankahl",
              "author_url": "",
              "post_date": "04/24/2024 18:02:17",
              "content": "<p>Yes, that's the original sampling rate. For the data in this competition, we resampled all recordings to 32 kHz to be consistent with previous editions.</p>",
              "votes": null,
              "replies": [
                {
                  "id": 2772456,
                  "author_name": "cpmpml",
                  "author_url": "",
                  "post_date": "04/24/2024 18:22:35",
                  "content": "<p>thanks for the confirmation.</p>",
                  "votes": null,
                  "replies": []
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2765555": "In \"Dataset Description\",\n\"The training data consists of short recordings of individual bird calls generously uploaded by users of xenocanto.org. \nThese files have been downsampled to 32 kHz where applicable to match the test set audio and converted to the ogg format.\"\nBut, librosa.load returns a sampling rate of 22050.\nAnd if I take the first row of train_metadata.csv, asbfly/XC134896.ogg, for example, the data length is 603073.\n603073 is 27.3 sec if sampling rate is 22050, 18.8 sec if sampling rate is 32kHz.\nLooking at https://xeno-canto.org/134896, the recording data is about 27 sec, and it sounds similar if I play XC134896.ogg at 22050Hz.\nSo, I think the sampling rate of train data is 22050Hz.\nIf the sampling rate of training data is 22050 and that of test data is 32kHz, we should resample one of these.\nBut is the sampling rate of test data really 32kHz?",
    "2765592": "Hello,\n\nBy default, librosa loads files with a sampling rate of 22050, if you want to load the file with the original sampling rate then specify in the load: sr = None\n\n`\ny, sr = librosa.load(audio_filename,sr=None,mono=False,duration =90)\n`\n\nYou will get the sampling of the file in the variable sr.\n\nThierry",
    "2765635": "Thanks.\nI am sorry I did not read the librosa document thoroughly.",
    "2772157": "I am glad the question has already been answered. The sampling rate is variable (it can be 48kHz in some sites or 44kHz in others or something else altogether).",
    "2772308": "Hi, what you say is a bit surprising given the data tab read:\n\n> train_audio/  [...] These files have been downsampled to 32 kHz where applicable to match the test set audio and converted to the ogg format. \n\nFrom this one can easily assume that test data is downsampled at 32 kHz.\n\nNow you say something different. Are you discussing the original sampling rate or the sampling rate of the test data here?",
    "2772417": "Yes, that's the original sampling rate. For the data in this competition, we resampled all recordings to 32 kHz to be consistent with previous editions.",
    "2772456": "thanks for the confirmation."
  },
  "source": "meta"
}