asrtoolkit/data_structures/audio_file.py
def prepare_for_training(self, file_name):
    """
      Converts to single channel (from channel 1) 16k audio file in SPH file format
    """
    if file_name.split(".")[-1] != 'sph':
      print("Forcing training data to use SPH file format")
      file_name = ".".join(file_name.split(".")[-1]) + ".sph"

    file_name = sanitize_hyphens(file_name)
    subprocess.call(["sox {} {} rate 16k remix 1".format(self.location, file_name)], shell=True)

    # return new object
    return audio_file(file_name)

      Converts to single channel (from channel 1) 16k audio file in SPH file format
    
Converts to single channel (from channel 1) 16k audio file in SPH file format
Converts to single channel ( from channel 1 ) 16k audio file in SPH file format
def prepare_for_training(self, file_name):
    if file_name.split(".")[-1] != 'sph':
      print("Forcing training data to use SPH file format")
      file_name = ".".join(file_name.split(".")[-1]) + ".sph"
    file_name = sanitize_hyphens(file_name)
    subprocess.call(["sox {} {} rate 16k remix 1".format(self.location, file_name)], shell=True)
    return audio_file(file_name)
def prepare_for_training ( self , file_name ) : if file_name . split ( "." ) [ - 1 ] != 'sph' : print ( "Forcing training data to use SPH file format" ) file_name = "." . join ( file_name . split ( "." ) [ - 1 ] ) + ".sph" file_name = sanitize_hyphens ( file_name ) subprocess . call ( [ "sox {} {} rate 16k remix 1" . format ( self . location , file_name ) ] , shell = True ) return audio_file ( file_name )
Converts to single channel (from channel 1) 16k audio file in SPH file format
Converts to single channel ( from channel 1 ) 16k audio file in SPH file format
"""
      Converts to single channel (from channel 1) 16k audio file in SPH file format
    """ # return new object
self
file_name