File size: 520 Bytes
035f557
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from audio_utils import transcribe_audio
from deep_model import predict_accent

class AccentAgent:
    def __init__(self, audio_path):
        self.audio_path = audio_path
        self.transcription = ""
        self.accent = ""

    def run(self):
        self.accent = predict_accent(self.audio_path)
        self.transcription = transcribe_audio(self.audio_path)

        return {
            "audio_path": self.audio_path,
            "accent": self.accent,
            "transcription": self.transcription
        }