Spaces:
Runtime error
Runtime error
add readMe file
Browse files
README.md
CHANGED
|
@@ -10,3 +10,21 @@ pinned: false
|
|
| 10 |
---
|
| 11 |
|
| 12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
| 13 |
+
|
| 14 |
+
# Realtime translator
|
| 15 |
+
|
| 16 |
+
Our aim to use real-time translator in meeting remove
|
| 17 |
+
## Enviroment
|
| 18 |
+
Clone repo and create python virtual environment
|
| 19 |
+
```bash
|
| 20 |
+
- pip install virtualenv
|
| 21 |
+
- virtualenv my_name
|
| 22 |
+
- cd <envname>
|
| 23 |
+
- Scripts\activate
|
| 24 |
+
- pip install -r requirements.txt
|
| 25 |
+
```
|
| 26 |
+
|
| 27 |
+
# Run application
|
| 28 |
+
```
|
| 29 |
+
python app.py
|
| 30 |
+
```
|
app.py
CHANGED
|
@@ -89,7 +89,7 @@ def translate(audio_file,lan):
|
|
| 89 |
with open(audio_file, 'rb') as f:
|
| 90 |
result = openai.Audio.translate("whisper-1", f)
|
| 91 |
text=result.text
|
| 92 |
-
|
| 93 |
if lan=="English" or lan=="Other" or text=="":
|
| 94 |
message=text
|
| 95 |
else:
|
|
|
|
| 89 |
with open(audio_file, 'rb') as f:
|
| 90 |
result = openai.Audio.translate("whisper-1", f)
|
| 91 |
text=result.text
|
| 92 |
+
|
| 93 |
if lan=="English" or lan=="Other" or text=="":
|
| 94 |
message=text
|
| 95 |
else:
|