| 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 | |
| } | |