Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for 24 kHz sampling rate #466

Closed
4 tasks
ChristianGeng opened this issue Nov 18, 2024 · 6 comments · Fixed by #467
Closed
4 tasks

Add support for 24 kHz sampling rate #466

ChristianGeng opened this issue Nov 18, 2024 · 6 comments · Fixed by #467
Labels
enhancement New feature or request

Comments

@ChristianGeng
Copy link
Member

Description

We should add support for 24 kHz (24000 Hz) sampling rate across the library. This sampling rate is commonly used in various audio applications and would be a valuable addition to our supported rates.

Current State

Currently supported sampling rates:

  • 8000 Hz
  • 16000 Hz
  • 22500 Hz
  • 44100 Hz
  • 48000 Hz

Proposed Changes

Add 24000 Hz to:

  • SAMPLING_RATES list in audb/core/define.py
  • Test cases in tests/test_convert.py
  • Documentation in docs/load.rst
  • doctests in core

Motivation

24 kHz is a common sampling rate used in:

  • Speech recognition systems
  • Voice assistants
  • Telephony applications
  • Audio compression formats optimized for voice

Implementation Notes

The changes should be straightforward as we already have the infrastructure to support different sampling rates. We just need to add the new rate to the existing list and update relevant tests and documentation.

Testing

We should verify:

  • Loading and converting audio files to 24 kHz
  • Converting from 24 kHz to other rates
  • All existing tests pass with the new rate

Documentation

Update the sampling rate list in the documentation to include 24 kHz while maintaining the ascending order.

/label enhancement

@hagenw
Copy link
Member

hagenw commented Nov 19, 2024

I also wonder, why we support 22,500 Hz. This seems like a typo to me, as a common sampling rate is 22,050 Hz, e.g. as used in CSS10 and LJSpeech. See also https://github.com/audiojs/sample-rate.

As 24,000 Hz is close to 22,050 Hz, do you have examples for datasets stored with 24,000 Hz?

@hagenw
Copy link
Member

hagenw commented Nov 19, 2024

I found a few examples myself. Seems to be that 24,000 Hz is used by TTS datasets, e.g. https://www.arxiv.org/abs/2408.06227.

@ChristianGeng
Copy link
Member Author

ChristianGeng commented Nov 19, 2024 via email

@ChristianGeng
Copy link
Member Author

ChristianGeng commented Nov 19, 2024 via email

@hagenw
Copy link
Member

hagenw commented Nov 19, 2024

OK, then let's first add support for 24,000 Hz (as started in #467). And afterwards work on fixing 22,050 Hz as described in #468.

@hagenw hagenw changed the title Title: Add support for 24 kHz sampling rate Add support for 24 kHz sampling rate Nov 19, 2024
@ChristianGeng
Copy link
Member Author

OK, then let's first add support for 24,000 Hz (as started in #467). And afterwards work on fixing 22,050 Hz as described in #468.

I assigned the review to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants