flexthink commited on
Commit
95b81be
1 Parent(s): 11cc4b7

Change "id" to "sample_id", to avoid conflict with SpeechBrain's DynamicItemDataset

Browse files
Files changed (1) hide show
  1. librig2p-nostress-space.py +3 -3
librig2p-nostress-space.py CHANGED
@@ -35,7 +35,7 @@ class GraphemeToPhoneme(datasets.GeneratorBasedBuilder):
35
  description=_DESCRIPTION,
36
  features=datasets.Features(
37
  {
38
- "id": datasets.Value("string"),
39
  "speaker_id": datasets.Value("string"),
40
  "origin": datasets.Value("string"),
41
  "char": datasets.Value("string"),
@@ -72,9 +72,9 @@ class GraphemeToPhoneme(datasets.GeneratorBasedBuilder):
72
  def _generate_examples(self, datapath, datatype):
73
  with open(datapath, encoding="utf-8") as f:
74
  data = json.load(f)
75
- for sentence_counter, (item_id, item) in enumerate(data.items()):
76
  resp = {
77
- "id": item_id,
78
  "speaker_id": str(item.get("speaker_id") or _NA),
79
  "origin": item["origin"],
80
  "char": item["char"],
 
35
  description=_DESCRIPTION,
36
  features=datasets.Features(
37
  {
38
+ "sample_id": datasets.Value("string"),
39
  "speaker_id": datasets.Value("string"),
40
  "origin": datasets.Value("string"),
41
  "char": datasets.Value("string"),
 
72
  def _generate_examples(self, datapath, datatype):
73
  with open(datapath, encoding="utf-8") as f:
74
  data = json.load(f)
75
+ for sentence_counter, (sample_id, item) in enumerate(data.items()):
76
  resp = {
77
+ "sample_id": sample_id,
78
  "speaker_id": str(item.get("speaker_id") or _NA),
79
  "origin": item["origin"],
80
  "char": item["char"],