The viewer is disabled because this dataset repo requires arbitrary Python code execution. Please consider removing the loading script and relying on automated data support (you can use convert_to_parquet from the datasets library). If this is not possible, please open a discussion for direct help.

Dataset Card for OpenBible Swahili

OpenBible Swahili is a verse-level segmented audio of Swahili: Biblica® Open Kiswahili Contemporary Version (Neno). This dataset/project is inspired by masakhane-io/bibleTTS and coqui-ai/open-bible-scripts, with a twist of applying the more recent Massively Multilingual Speech (MMS) for audio alignment.

Dataset Details

Dataset Description

For a more detailed description, please refer to OpenBible-TTS.

We followed the CTC Forced Alignment API Tutorial graciously provided by PyTorch. We used the Massively Multilingual Speech (MMS) model to align the audio to the text.

Like the challenges explained in the MMS paper, we also faced the same noisy audio alignment issues:

  • Chapter introduction narration
  • Occasional verse number reading
  • Digits/number handling

While masakhane-io/bibleTTS proposes a solution by manually (1) inserting chapter introduction transcript and (2) spells out numbers, we decided to use a mix of MMS' method by (1) inserting * token for additional speech (e.g. chapter introduction, verse number reading) and (2) converting digits to words using num2words, if available.

The aligned verse text and audio are then segmented into verse-level segments for TTS model training.

As proposed in §3.1.5 of MMS, we also implemented a length-normalized probability difference filtering to remove noisy alignments based on the following equation:

1T[logP(YalignedX)logP(YgreedyX)]\frac{1}{T} \left[\log P\left(Y^{\text {aligned}} \mid X\right)-\log P\left(Y^{\text {greedy}} \mid X\right)\right]

where TT is the length of the audio, P(YalignedX)P\left(Y^{\text{aligned}} \mid X\right) is the probability of the forced-alignment path, and P(YgreedyX)P\left(Y^{\text{greedy}} \mid X\right) is the probability of the greedy sequence.

Like MMS, we select −0.2 as the default threshold and choose samples with scores greater than this threshold. We call the resultant subsets clean, which you can load as shown in the Usage section.

⚠️ 2 Chronicles 13-14 (2CH_013, 2CH_014) have corrupt source audio. In the non-clean subsets, these chapters might be problematic for training!

We recommend reading the MMS paper for better understanding.

Usage

from datasets import load_dataset

# all 66 books
dataset = load_dataset("bookbot/OpenBible_Swahili", trust_remote_code=True)
# all 66 books, clean subset
dataset = load_dataset("bookbot/OpenBible_Swahili", "clean", trust_remote_code=True)
# only Genesis
dataset = load_dataset("bookbot/OpenBible_Swahili", "GEN", trust_remote_code=True)
# only Genesis, clean subset
dataset = load_dataset("bookbot/OpenBible_Swahili", "GEN_clean", trust_remote_code=True)

Dataset Structure

Data Instances

{
    "id": "GEN_001_001",
    "verse_id": "GEN 1:1",
    "audio": {
        "path": "GEN/GEN_001/GEN_001_001.wav",
        "array": array([0.0010376, 0.0007019, 0.00015259, ..., 0.00817871, 0.00482178, 0.01132202]),
        "sampling_rate": 44100,
    },
    "verse_text": "Hapo mwanzo Mungu aliumba mbingu na dunia.",
    "transcript": "hapo mwanzo mungu aliumba mbingu na dunia",
}

Data Fields

  • id: a unique identifier for the verse, formatted as BOOK_CHAPTER_VERSE.
  • verse_id: the verse identifier, formatted as BOOK CHAPTER:VERSE.
  • audio: a dictionary containing the path to the audio file, the decoded audio array, and the sampling rate.
    • path: the path to the audio file.
    • array: the decoded audio array.
    • sampling_rate: the sampling rate of the audio.
  • verse_text: the verse text, with proper capitalization and punctuations.
  • transcript: the lowercased, punctuation-removed version of verse_text, used during forced-alignment.

Data Splits

USX Code Book Name #verses #verses (clean)
GEN Genesis 1533 1498
EXO Exodus 1213 1070
LEV Leviticus 859 813
NUM Numbers 1288 1188
DEU Deuteronomy 959 940
JOS Joshua 658 585
JDG Judges 618 610
RUT Ruth 85 83
1SA 1 Samuel 810 799
2SA 2 Samuel 695 672
1KI 1 Kings 816 773
2KI 2 Kings 719 597
1CH 1 Chronicles 942 859
2CH 2 Chronicles 822 692
EZR Ezra 280 226
NEH Nehemiah 406 353
EST Esther 167 166
JOB Job 1070 1050
PSA Psalms 2461 2367
PRO Proverbs 915 893
ECC Ecclesiastes 222 221
SNG Song of Songs 117 114
ISA Isaiah 1292 1223
JER Jeremiah 1364 1297
LAM Lamentations 154 149
EZK Ezekiel 1273 1258
DAN Daniel 357 335
HOS Hosea 197 194
JOL Joel 73 70
AMO Amos 146 144
OBA Obadiah 21 20
JON Jonah 48 48
MIC Micah 105 103
NAM Nahum 47 46
HAB Habakkuk 56 55
ZEP Zephaniah 53 53
HAG Haggai 38 37
ZEC Zechariah 211 211
MAL Malachi 55 55
MAT Matthew 1071 1004
MRK Mark 678 557
LUK Luke 1151 1027
JHN John 879 856
ACT Acts 1007 916
ROM Romans 433 416
1CO 1 Corinthians 437 404
2CO 2 Corinthians 257 252
GAL Galatians 149 145
EPH Ephesians 155 152
PHP Philippians 104 99
COL Colossians 95 89
1TH 1 Thessalonians 89 86
2TH 2 Thessalonians 47 47
1TI 1 Timothy 113 109
2TI 2 Timothy 83 83
TIT Titus 46 42
PHM Philemon 25 24
HEB Hebrews 303 278
JAS James 108 108
1PE 1 Peter 105 91
2PE 2 Peter 61 56
1JN 1 John 105 103
2JN 2 John 13 13
3JN 3 John 15 15
JUD Jude 25 24
REV Revelation 404 370
Total 31103 29233

Additional Information

Licensing Information

CC-BY-SA 4.0

Downloads last month
74

Models trained or fine-tuned on bookbot/OpenBible_Swahili

Collection including bookbot/OpenBible_Swahili