-
Notifications
You must be signed in to change notification settings - Fork 702
Data points remain tuples #330
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
Conversation
"waveform": waveform, | ||
"sample_rate": sample_rate, | ||
} | ||
with open(file_text) as ft: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding this as part of this PR to make sure that the file is closed.
utterance, | ||
int(speaker_id), | ||
int(chapter_id), | ||
int(utterance_id), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also converting to int though they come from file names.
@@ -11,16 +11,20 @@ | |||
|
|||
def load_yesno_item(fileid, path, ext_audio): | |||
# Read label | |||
label = fileid.split("_") | |||
labels = [int(c) for c in fileid.split("_")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also converting to int though they come from file names.
Just modified CommonVoice to return a tuple (waveform, sample_rate, dictionary), where the dictionary contains the data and header from the tsv. This is closer to how the data is provided by CommonVoice. The only assumption on the tsv is that the second column is the name of the audio file to retrieve. The previous iteration was:
P.S. The notation with *line is not compatible with python 2. |
Since this is what has been most used in domains, we keep tuples as the item to return for now.
for CommonVoice:
for LibriSpeech:
for VCTK:
for YesNo:
CC #303