Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ from gtts import gTTS
|
|
7 |
import io
|
8 |
from pydub import AudioSegment
|
9 |
import time
|
10 |
-
|
11 |
|
12 |
# Create audio directory if it doesn't exist
|
13 |
if not os.path.exists('audio'):
|
@@ -71,7 +71,7 @@ def transcribe_audio(audio):
|
|
71 |
# Function to get IPA transcription
|
72 |
def ipa_transcription(sentence):
|
73 |
try:
|
74 |
-
ipa =
|
75 |
return ipa
|
76 |
except Exception as e:
|
77 |
return f"Error during IPA transcription: {e}"
|
|
|
7 |
import io
|
8 |
from pydub import AudioSegment
|
9 |
import time
|
10 |
+
import eng_to_ipa as ipa
|
11 |
|
12 |
# Create audio directory if it doesn't exist
|
13 |
if not os.path.exists('audio'):
|
|
|
71 |
# Function to get IPA transcription
|
72 |
def ipa_transcription(sentence):
|
73 |
try:
|
74 |
+
ipa = ipa.convert(sentence)
|
75 |
return ipa
|
76 |
except Exception as e:
|
77 |
return f"Error during IPA transcription: {e}"
|