Spaces:
				
			
			
	
			
			
		Runtime error
		
	
	
	
			
			
	
	
	
	
		
		
		Runtime error
		
	fix: fix audio input
Browse files
    	
        app.py
    CHANGED
    
    | @@ -47,7 +47,7 @@ def process_audio(audio: tuple, state: AppState): | |
| 47 | 
             
                else:
         | 
| 48 | 
             
                    state.stream = np.concatenate((state.stream, audio[1]))
         | 
| 49 |  | 
| 50 | 
            -
                return  | 
| 51 |  | 
| 52 |  | 
| 53 | 
             
            def update_or_append_conversation(conversation, id, role, new_content):
         | 
| @@ -235,7 +235,7 @@ with gr.Blocks() as demo: | |
| 235 | 
             
                stream = input_audio.stream(
         | 
| 236 | 
             
                    process_audio,
         | 
| 237 | 
             
                    [input_audio, state],
         | 
| 238 | 
            -
                    [ | 
| 239 | 
             
                    stream_every=0.25,  # Reduced to make it more responsive
         | 
| 240 | 
             
                    time_limit=60,  # Increased to allow for longer messages
         | 
| 241 | 
             
                )
         | 
|  | |
| 47 | 
             
                else:
         | 
| 48 | 
             
                    state.stream = np.concatenate((state.stream, audio[1]))
         | 
| 49 |  | 
| 50 | 
            +
                return state  # Only state is returned
         | 
| 51 |  | 
| 52 |  | 
| 53 | 
             
            def update_or_append_conversation(conversation, id, role, new_content):
         | 
|  | |
| 235 | 
             
                stream = input_audio.stream(
         | 
| 236 | 
             
                    process_audio,
         | 
| 237 | 
             
                    [input_audio, state],
         | 
| 238 | 
            +
                    [state],
         | 
| 239 | 
             
                    stream_every=0.25,  # Reduced to make it more responsive
         | 
| 240 | 
             
                    time_limit=60,  # Increased to allow for longer messages
         | 
| 241 | 
             
                )
         | 
 
			
