Skip to content

Commit

Permalink
bad variable (keras-team#1981)
Browse files Browse the repository at this point in the history
  • Loading branch information
Draeli authored Oct 24, 2024
1 parent aea96de commit 6975926
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/audio/ipynb/transformer_asr.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@
" \"\"\"returns mapping of audio paths and transcription texts\"\"\"\n",
" data = []\n",
" for w in wavs:\n",
" id = pattern_wav_name.split(test)[-4]\n",
" id = pattern_wav_name.split(w)[-4]\n",
" if len(id_to_text[id]) < maxlen:\n",
" data.append({\"audio\": w, \"text\": id_to_text[id]})\n",
" return data\n"
Expand Down
2 changes: 1 addition & 1 deletion examples/audio/md/transformer_asr.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ def get_data(wavs, id_to_text, maxlen=50):
"""returns mapping of audio paths and transcription texts"""
data = []
for w in wavs:
id = pattern_wav_name.split(test)[-4]
id = pattern_wav_name.split(w)[-4]
if len(id_to_text[id]) < maxlen:
data.append({"audio": w, "text": id_to_text[id]})
return data
Expand Down
2 changes: 1 addition & 1 deletion examples/audio/transformer_asr.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def get_data(wavs, id_to_text, maxlen=50):
"""returns mapping of audio paths and transcription texts"""
data = []
for w in wavs:
id = pattern_wav_name.split(test)[-4]
id = pattern_wav_name.split(w)[-4]
if len(id_to_text[id]) < maxlen:
data.append({"audio": w, "text": id_to_text[id]})
return data
Expand Down

0 comments on commit 6975926

Please sign in to comment.