Spaces:
				
			
			
	
			
			
		Running
		
			on 
			
			Zero
	
	
	
			
			
	
	
	
	
		
		
		Running
		
			on 
			
			Zero
	Update app.py
Browse files
    	
        app.py
    CHANGED
    
    | @@ -233,14 +233,14 @@ def infer_batch(ref_audio, ref_text, gen_text_batches, exp_name, remove_silence, | |
| 233 | 
             
                generated_waves = []
         | 
| 234 | 
             
                spectrograms = []
         | 
| 235 | 
             
            # Remove the last 5 chats, ensuring you don't attempt to slice beyond the list length
         | 
| 236 | 
            -
                ref_text = ref_text[:- | 
| 237 |  | 
| 238 | 
             
            # Ensure ref_text ends with a space if the last character is single-byte
         | 
| 239 | 
             
            #    if len(ref_text[-1].encode("utf-8")) == 1:
         | 
| 240 | 
             
             #       ref_text = ref_text + ".  ."
         | 
| 241 |  | 
| 242 | 
             
            # Define weights for characters
         | 
| 243 | 
            -
                punctuation_weights = {",":  | 
| 244 |  | 
| 245 | 
             
                for i, gen_text in enumerate(progress.tqdm(gen_text_batches)):
         | 
| 246 | 
             
                    # Prepare the text
         | 
|  | |
| 233 | 
             
                generated_waves = []
         | 
| 234 | 
             
                spectrograms = []
         | 
| 235 | 
             
            # Remove the last 5 chats, ensuring you don't attempt to slice beyond the list length
         | 
| 236 | 
            +
                ref_text = ref_text[:-5] + "... " if len(ref_text) >= 5 else ref_text
         | 
| 237 |  | 
| 238 | 
             
            # Ensure ref_text ends with a space if the last character is single-byte
         | 
| 239 | 
             
            #    if len(ref_text[-1].encode("utf-8")) == 1:
         | 
| 240 | 
             
             #       ref_text = ref_text + ".  ."
         | 
| 241 |  | 
| 242 | 
             
            # Define weights for characters
         | 
| 243 | 
            +
                punctuation_weights = {",": 0, ".": 0, " ": 0}  # Add more punctuation as needed
         | 
| 244 |  | 
| 245 | 
             
                for i, gen_text in enumerate(progress.tqdm(gen_text_batches)):
         | 
| 246 | 
             
                    # Prepare the text
         |