diff --git a/transcribe_audio.py b/transcribe_audio.py deleted file mode 100644 index beb3623..0000000 --- a/transcribe_audio.py +++ /dev/null @@ -1,5 +0,0 @@ -def transcribe_audio(model, audio_data): - options = dict(beam_size=5, best_of=5) - transcribe_options = dict(task="transcribe", **options) - transcript = model.transcribe(audio_data, **transcribe_options) - return transcript["text"] diff --git a/translate_text.py b/translate_text.py deleted file mode 100644 index 5c2d5b5..0000000 --- a/translate_text.py +++ /dev/null @@ -1,17 +0,0 @@ -#import openai -from config import openai_api_key - -#openai.api_key = openai_api_key - -def translate_text(text): - prompt = f"Translate the following text from given audio language to English:\n\n{text}" - response = openai.chat.completions.create( - model="gpt-3.5-turbo", - messages=[ - {"role": "system", "content": "You are a helpful assistant that translates text from Indian languages to English."}, - {"role": "user", "content": prompt} - ], - max_tokens=150 - ) - translated_text = response.choices[0].message.content - return translated_text