Skip to content

Conversation

@engineerchuan
Copy link
Contributor

Used 'sox -i ' with default 14.4.2 options

soxi output for the wave file I created:

Input File     : 'assets/CommonVoice/cv-corpus-4-2019-12-10/tt/clips/common_voice_tt_00000000.wav'
Channels       : 1
Sample Rate    : 44100
Precision      : 16-bit
Duration       : 00:00:05.00 = 220500 samples = 375 CDDA sectors
File Size      : 441k
Bit Rate       : 706k
Sample Encoding: 16-bit Signed Integer PCM

I wasn't sure about whether we need to change Line 111 of torchaudio/datasets/commonvoice.py.

class COMMONVOICE(Dataset):
    """
    Create a Dataset for CommonVoice. Each item is a tuple of the form:
    (waveform, sample_rate, dictionary)
    where dictionary is a dictionary built from the tsv file with the following keys:
    client_id, path, sentence, up_votes, down_votes, age, gender, accent.
    """

    _ext_txt = ".txt"
    _ext_audio = ".mp3"
    _folder_audio = "clips"

Used 'sox -i <mp3> <wav>' with default 14.4.2 options
Issue also mentioned test.wav accidentally checked in but this does not seem to be there.
@codecov
Copy link

codecov bot commented Jul 11, 2020

Codecov Report

Merging #772 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #772   +/-   ##
=======================================
  Coverage   89.53%   89.53%           
=======================================
  Files          32       32           
  Lines        2617     2617           
=======================================
  Hits         2343     2343           
  Misses        274      274           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c375490...9d0dc78. Read the comment docs.

@mthrok
Copy link
Contributor

mthrok commented Jul 11, 2020

Hi @engineerchuan

Thanks for working on this.

Looks like waves_yesno/0_1_0_1_0_1_1_0.wav and one more file (not sure which one but the one used for test_gtzan) are actually used by test, which I overlooked. Could you put them ?

I wasn't sure about whether we need to change Line 111 of torchaudio/datasets/commonvoice.py.

We should be only changing test, so torchaudio/datasets/commonvoice.py should stay the same. Did you have an issue that way?

@mthrok
Copy link
Contributor

mthrok commented Jul 11, 2020

Also, can you try reduce the sampling rate of the new wav file (assets/CommonVoice/cv-corpus-4-2019-12-10/tt/clips/common_voice_tt_00000000.wav.) to 8000 Hz? The quality of the audio should not matter to tests and we would like to keep them as small as possible.

@engineerchuan engineerchuan changed the title Convert CommonVoice tartar training file from mp3 to wav (44.1kHz) Convert CommonVoice tartar training file from mp3 to wav (8kHz), and remove unused file Jul 11, 2020
Copy link
Contributor

@mthrok mthrok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Thanks!

@mthrok mthrok merged commit 26941fa into pytorch:master Jul 12, 2020
@mthrok
Copy link
Contributor

mthrok commented Jul 12, 2020

Followup: Remove https://github.com/pytorch/audio/blob/master/test/test_datasets.py#L51 and https://github.com/pytorch/audio/blob/master/test/test_datasets.py#L49 to see if this test works on Windows.

@engineerchuan If you have time, would you like to try ^ ?

@engineerchuan engineerchuan deleted the issue_764_remove_insignificant_test_assets_try_2 branch July 12, 2020 12:56
@engineerchuan
Copy link
Contributor Author

Followup: Remove https://github.com/pytorch/audio/blob/master/test/test_datasets.py#L51 and https://github.com/pytorch/audio/blob/master/test/test_datasets.py#L49 to see if this test works on Windows.

@engineerchuan If you have time, would you like to try ^ ?

Yes I will try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants