| 
					
				 | 
			
			
				@@ -220,7 +220,7 @@ def transcribe( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             else: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 duration = segment_duration 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 timestamps = tokens[timestamp_tokens.nonzero().flatten()] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if len(timestamps) > 0: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if len(timestamps) > 0 and timestamps[-1].item() != tokenizer.timestamp_begin: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     # no consecutive timestamps but it has a timestamp; use the last one. 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     # single timestamp at the end means no speech after the last timestamp. 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     last_timestamp_position = timestamps[-1].item() - tokenizer.timestamp_begin 
			 |