Skip to content

Commit

Permalink
Update pyai.py
Browse files Browse the repository at this point in the history
  • Loading branch information
MitchellShibilski-Unkel committed Mar 29, 2024
1 parent 4305173 commit c3a67a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyai.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def __init__(self, audio: str):
self.model = whisper.load_model("base")
self.audio = audio

def generateTextFromAudio(self):
def generateTextFromAudio(self) -> str:
aud = whisper.load_audio(self.audio)
aud = whisper.pad_or_trim(aud)

Expand All @@ -45,7 +45,7 @@ def generateTextFromAudio(self):

return result.text

def translateText(self, text: str, dataSet: str):
def translateText(self, text: str, dataSet: str) -> str:
with open(dataSet, "r") as d:
data = d.read()

Expand Down

0 comments on commit c3a67a0

Please sign in to comment.