<jupyter_start><jupyter_text>Rename name on wav_speech<jupyter_code># Pythono3 code to rename multiple 
# files in a directory or folder 

# importing os module 
import os 
import ipdb

# Function to rename multiple files 
def folder(sub_name, new_sub_name, repository):

    for count, filename in enumerate(os.listdir(repository)): 
        
        name = filename.split(sub_name)[0]

        if filename == name:
            continue
        else:
            ext = '.'+filename.split('.')[-1]

            # dst ="Hostel" + str(count) + ".jpg"

            src = repository+"/"+name+sub_name+ext 
            dst = repository+"/"+name+new_sub_name+ext

#             ipdb.set_trace()

            ## rename() function will 
            ## rename all the files 
            os.rename(src, dst) 
  
            

# Driver Code 
if __name__ == '__main__':     
    folder(sub_name = "_one_channel",
           new_sub_name = "", 
           repository="../dataset/english/wav")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11397423191278494, 'fraction_numerical': 0.002973240832507433, 'mean_word_length': 2.15625, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '86294', 'license': 'MIT', 'n_tokens_mistral': 323, 'n_tokens_neox': 304, 'n_words': 72, 'path': 'notebooks/05.Rename_wav_files.ipynb', 'repo_name': 'Kabongosalomon/LiSTra', 'size': '1009'}