Newer
Older
using SpeechDatasets
using Test
## The following tests do not work on the Gitlab CI because the volumes are not mounted on the runner. TODO find better tests
# PATHS = JSON.parsefile(
# joinpath(@__DIR__, "..", "DatasetsDocumentation", "corpora.json")
# )
# rm("/tmp/pfc/recordings.jsonl", force=true)
# rm("/tmp/pfc/annotations.jsonl", force=true)
# rm("/tmp/timit/recordings.jsonl", force=true)
# rm("/tmp/timit/annotations.jsonl", force=true)
# rm("/tmp/FAETAR_ASR_CHALLENGE_2025/recordings.jsonl", force=true)
# rm("/tmp/FAETAR_ASR_CHALLENGE_2025/annotations.jsonl", force=true)
# println("Testing FAETAR_ASR_CHALLENGE_2025 loading")
# ds = SpeechDatasets.dataset(:FAETAR_ASR_CHALLENGE_2025, PATHS["FAETAR_ASR_CHALLENGE_2025"]["path"], "/tmp/FAETAR_ASR_CHALLENGE_2025")
# @test isfile("/tmp/FAETAR_ASR_CHALLENGE_2025/recordings.jsonl")
# @test isfile("/tmp/FAETAR_ASR_CHALLENGE_2025/annotations.jsonl")
# println("Testing TIMIT loading")
# ds = SpeechDatasets.dataset(:TIMIT, PATHS["TIMIT"]["path"], "/tmp/timit")
# @test isfile("/tmp/timit/recordings.jsonl")
# @test isfile("/tmp/timit/annotations.jsonl")
# println("Testing PFC_LISN loading")
# ds = SpeechDatasets.dataset(:PFC_LISN, PATHS["PFC_LISN"]["path"], "/tmp/pfc")
# @test isfile("/tmp/pfc/recordings.jsonl")
# @test isfile("/tmp/pfc/annotations.jsonl")
# println("Testing SYNTHETIC_VOWEL_DATASET loading")
# ds = SpeechDatasets.dataset(:SYNTHETIC_VOWEL_DATASET, PATHS["SYNTHETIC_VOWEL_DATASET"]["path"], "/tmp/synset")
# @test isfile("/tmp/synset/recordings.jsonl")
# @test isfile("/tmp/synset/annotations.jsonl")