Update app.py
Browse files
app.py
CHANGED
|
@@ -38,6 +38,14 @@ def transcribe(audio):
|
|
| 38 |
text = transcriber({"sampling_rate": sr, "raw": y})["text"]
|
| 39 |
text = text.replace("nouvelle ligne", "\n")
|
| 40 |
text = text.replace("à la ligne", "\n")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
return text
|
| 43 |
|
|
|
|
| 38 |
text = transcriber({"sampling_rate": sr, "raw": y})["text"]
|
| 39 |
text = text.replace("nouvelle ligne", "\n")
|
| 40 |
text = text.replace("à la ligne", "\n")
|
| 41 |
+
text = text.replace(" virgule", ",")
|
| 42 |
+
text = text.replace(" virgule", ",")
|
| 43 |
+
text = text.replace(" point", ".")
|
| 44 |
+
text = text.replace(" point", ".")
|
| 45 |
+
text = text.replace(" deux points", ":")
|
| 46 |
+
text = text.replace(" deux points", ":")
|
| 47 |
+
text = text.replace(" nouveau paragraphe ", "\n\n")
|
| 48 |
+
text = text.replace(" paragraphe ", "\n\n")
|
| 49 |
|
| 50 |
return text
|
| 51 |
|