This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| "Traceback (most recent call last):", | |
| " File \"/home/ubuntu/miniconda3/lib/python3.10/site-packages/urllib3/connectionpool.py\", line 703, in urlopen", | |
| " httplib_response = self._make_request(", | |
| " File \"/home/ubuntu/miniconda3/lib/python3.10/site-packages/urllib3/connectionpool.py\", line 398, in _make_request", | |
| " conn.request(method, url, **httplib_request_kw)", | |
| " File \"/home/ubuntu/miniconda3/lib/python3.10/site-packages/urllib3/connection.py\", line 239, in request", | |
| " super(HTTPConnection, self).request(method, url, body=body, headers=headers)", | |
| " File \"/home/ubuntu/miniconda3/lib/python3.10/http/client.py\", line 1282, in request", | |
| " self._send_request(method, url, body, headers, encode_chunked)", |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import gradio as gr | |
| import numpy as np | |
| import wave | |
| def response(): | |
| def streaming(): | |
| f = wave.open("sound.wav", 'rb') | |
| buffer = f.readframes(f.getnframes()) | |
| data = np.frombuffer(buffer, dtype=f'int{f.getsampwidth()*8}') | |
| chunks = [] |
OlderNewer