{
  "id": 326404,
  "title": "Looking for a tutorial or notebook on mixing in background sounds",
  "url": "/competitions/birdclef-2022/discussion/326404",
  "author_name": "",
  "post_date": "2022-05-22T07:00:52.789821800Z",
  "votes": 1,
  "comment_count": 3,
  "views": 0,
  "content": "<p>I'd like to have a try at mixing in some other background recordings in the waveform augmentation stage.  It looks like a very relevant strategy for this competition.</p>\n<p>I was just wondering if anybody had come across a good learning notebook, or tutorial on this topic?  It doesn't need to be from a competition.</p>\n<p>Also, closely related, a good source for relevant bird-free recordings.</p>\n<p>Thanks in advance.</p>",
  "messages": [
    {
      "id": "1797615",
      "postDate": "05/22/2022 07:00:52",
      "content": "<p>I'd like to have a try at mixing in some other background recordings in the waveform augmentation stage.  It looks like a very relevant strategy for this competition.</p>\n<p>I was just wondering if anybody had come across a good learning notebook, or tutorial on this topic?  It doesn't need to be from a competition.</p>\n<p>Also, closely related, a good source for relevant bird-free recordings.</p>\n<p>Thanks in advance.</p>",
      "rawMarkdown": "I'd like to have a try at mixing in some other background recordings in the waveform augmentation stage.  It looks like a very relevant strategy for this competition.\n\nI was just wondering if anybody had come across a good learning notebook, or tutorial on this topic?  It doesn't need to be from a competition.\n\nAlso, closely related, a good source for relevant bird-free recordings.\n\nThanks in advance.",
      "votes": null
    },
    {
      "id": "1797843",
      "postDate": "05/22/2022 12:36:35",
      "content": "<p>you might not need a notebook, It as simple as reading, resampling, and doing a simple addition(+). Also, many of freefield1010's recordings are bird-free as well, and the set has metadata for each file, so I definitely recommend you to look into it!</p>\n<p>I'm not sure if posting a public notebook at this time of the contest is a good idea 👀</p>",
      "rawMarkdown": "you might not need a notebook, It as simple as reading, resampling, and doing a simple addition(+). Also, many of freefield1010's recordings are bird-free as well, and the set has metadata for each file, so I definitely recommend you to look into it!\n\nI'm not sure if posting a public notebook at this time of the contest is a good idea 👀",
      "votes": null
    },
    {
      "id": "1798055",
      "postDate": "05/22/2022 16:56:46",
      "content": "<p>You can easily add recordings using audiomentations. (Audiomentations is AA)</p>\n<pre><code>cfg.train_aug = AA.Compose(\n    [\n        AA.AddBackgroundNoise(\n            sounds_path=\"/input/ff1010bird_nocall/nocall\", min_snr_in_db=0, max_snr_in_db=3, p=0.5\n        ),\n        AA.AddBackgroundNoise(\n            sounds_path=\"/input/train_soundscapes/nocall\", min_snr_in_db=0, max_snr_in_db=3, p=0.25\n        ),\n        AA.AddBackgroundNoise(\n            sounds_path=\"/input/aicrowd2020_noise_30sec/noise_30sec\",\n            min_snr_in_db=0,\n            max_snr_in_db=3,\n            p=0.25,\n        ),\n    ]\n)\n</code></pre>\n<p>Then you just need to augment the wave like this<br>\n<code>wav = cfg.train_aug(samples=wav, sample_rate=self.cfg.sample_rate)</code></p>\n<p>This code is taken from the 2021 BirdCLEF 2nd place solution github.<br>\n <a href=\"https://github.com/ChristofHenkel/kaggle-birdclef2021-2nd-place\" target=\"_blank\">https://github.com/ChristofHenkel/kaggle-birdclef2021-2nd-place</a></p>",
      "rawMarkdown": "You can easily add recordings using audiomentations. (Audiomentations is AA)\n\n```\ncfg.train_aug = AA.Compose(\n    [\n        AA.AddBackgroundNoise(\n            sounds_path=\"/input/ff1010bird_nocall/nocall\", min_snr_in_db=0, max_snr_in_db=3, p=0.5\n        ),\n        AA.AddBackgroundNoise(\n            sounds_path=\"/input/train_soundscapes/nocall\", min_snr_in_db=0, max_snr_in_db=3, p=0.25\n        ),\n        AA.AddBackgroundNoise(\n            sounds_path=\"/input/aicrowd2020_noise_30sec/noise_30sec\",\n            min_snr_in_db=0,\n            max_snr_in_db=3,\n            p=0.25,\n        ),\n    ]\n)\n```\nThen you just need to augment the wave like this\n`wav = cfg.train_aug(samples=wav, sample_rate=self.cfg.sample_rate)`\n\nThis code is taken from the 2021 BirdCLEF 2nd place solution github.\n https://github.com/ChristofHenkel/kaggle-birdclef2021-2nd-place",
      "votes": null
    },
    {
      "id": "1798231",
      "postDate": "05/22/2022 19:42:52",
      "content": "<p>Awesome guys, thanks very much.</p>\n<p>That should be enough to get me started.  I've only time to train one more round, so I hope it works first go!</p>",
      "rawMarkdown": "Awesome guys, thanks very much.\n\nThat should be enough to get me started.  I've only time to train one more round, so I hope it works first go!",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1797843,
      "author_name": "jayeonyi",
      "author_url": "",
      "post_date": "05/22/2022 12:36:35",
      "content": "<p>you might not need a notebook, It as simple as reading, resampling, and doing a simple addition(+). Also, many of freefield1010's recordings are bird-free as well, and the set has metadata for each file, so I definitely recommend you to look into it!</p>\n<p>I'm not sure if posting a public notebook at this time of the contest is a good idea 👀</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1798055,
      "author_name": "vexxingbanana",
      "author_url": "",
      "post_date": "05/22/2022 16:56:46",
      "content": "<p>You can easily add recordings using audiomentations. (Audiomentations is AA)</p>\n<pre><code>cfg.train_aug = AA.Compose(\n    [\n        AA.AddBackgroundNoise(\n            sounds_path=\"/input/ff1010bird_nocall/nocall\", min_snr_in_db=0, max_snr_in_db=3, p=0.5\n        ),\n        AA.AddBackgroundNoise(\n            sounds_path=\"/input/train_soundscapes/nocall\", min_snr_in_db=0, max_snr_in_db=3, p=0.25\n        ),\n        AA.AddBackgroundNoise(\n            sounds_path=\"/input/aicrowd2020_noise_30sec/noise_30sec\",\n            min_snr_in_db=0,\n            max_snr_in_db=3,\n            p=0.25,\n        ),\n    ]\n)\n</code></pre>\n<p>Then you just need to augment the wave like this<br>\n<code>wav = cfg.train_aug(samples=wav, sample_rate=self.cfg.sample_rate)</code></p>\n<p>This code is taken from the 2021 BirdCLEF 2nd place solution github.<br>\n <a href=\"https://github.com/ChristofHenkel/kaggle-birdclef2021-2nd-place\" target=\"_blank\">https://github.com/ChristofHenkel/kaggle-birdclef2021-2nd-place</a></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1798231,
      "author_name": "ollypowell",
      "author_url": "",
      "post_date": "05/22/2022 19:42:52",
      "content": "<p>Awesome guys, thanks very much.</p>\n<p>That should be enough to get me started.  I've only time to train one more round, so I hope it works first go!</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1797615": "I'd like to have a try at mixing in some other background recordings in the waveform augmentation stage.  It looks like a very relevant strategy for this competition.\n\nI was just wondering if anybody had come across a good learning notebook, or tutorial on this topic?  It doesn't need to be from a competition.\n\nAlso, closely related, a good source for relevant bird-free recordings.\n\nThanks in advance.",
    "1797843": "you might not need a notebook, It as simple as reading, resampling, and doing a simple addition(+). Also, many of freefield1010's recordings are bird-free as well, and the set has metadata for each file, so I definitely recommend you to look into it!\n\nI'm not sure if posting a public notebook at this time of the contest is a good idea 👀",
    "1798055": "You can easily add recordings using audiomentations. (Audiomentations is AA)\n\n```\ncfg.train_aug = AA.Compose(\n    [\n        AA.AddBackgroundNoise(\n            sounds_path=\"/input/ff1010bird_nocall/nocall\", min_snr_in_db=0, max_snr_in_db=3, p=0.5\n        ),\n        AA.AddBackgroundNoise(\n            sounds_path=\"/input/train_soundscapes/nocall\", min_snr_in_db=0, max_snr_in_db=3, p=0.25\n        ),\n        AA.AddBackgroundNoise(\n            sounds_path=\"/input/aicrowd2020_noise_30sec/noise_30sec\",\n            min_snr_in_db=0,\n            max_snr_in_db=3,\n            p=0.25,\n        ),\n    ]\n)\n```\nThen you just need to augment the wave like this\n`wav = cfg.train_aug(samples=wav, sample_rate=self.cfg.sample_rate)`\n\nThis code is taken from the 2021 BirdCLEF 2nd place solution github.\n https://github.com/ChristofHenkel/kaggle-birdclef2021-2nd-place",
    "1798231": "Awesome guys, thanks very much.\n\nThat should be enough to get me started.  I've only time to train one more round, so I hope it works first go!"
  },
  "source": "meta"
}