This repository was archived by the owner on Jul 7, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
tensor2tensor/data_generators Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 3333 'tensor2tensor/bin/t2t-translate-all' ,
3434 ],
3535 install_requires = [
36+ 'absl-py' ,
3637 'bz2file' ,
3738 'dopamine-rl' ,
3839 'flask' ,
6465 'tensorflow' : ['tensorflow>=1.15.0' ],
6566 'tensorflow-hub' : ['tensorflow-hub>=0.1.1' ],
6667 'tests' : [
67- 'absl-py' ,
6868 # Needed to fix a Travis pytest error.
6969 # https://github.com/Julian/jsonschema/issues/449#issuecomment-411406525
7070 'attrs>=17.4.0' ,
Original file line number Diff line number Diff line change 1919from __future__ import print_function
2020
2121import os
22- from subprocess import call
22+ import subprocess
2323import tarfile
2424import wave
25- # from tensor2tensor.data_generators import generator_utils
26-
25+ from absl import flags
2726import tensorflow as tf
2827
29- flags = tf .flags
3028FLAGS = flags .FLAGS
3129
3230flags .DEFINE_string ("timit_paths" , "" ,
@@ -78,7 +76,7 @@ def _get_audio_data(filepath):
7876 # Construct a true .wav file.
7977 out_filepath = filepath .strip (".WAV" ) + ".wav"
8078 # Assumes sox is installed on system. Sox converts from NIST SPHERE to WAV.
81- call (["sox" , filepath , out_filepath ])
79+ subprocess . call (["sox" , filepath , out_filepath ])
8280 wav_file = wave .open (open (out_filepath ))
8381 frame_count = wav_file .getnframes ()
8482 byte_array = wav_file .readframes (frame_count )
You can’t perform that action at this time.
0 commit comments