huytofu92 commited on
Commit
82cf3f9
·
1 Parent(s): e5449c2

remove unwanted tool

Browse files
Files changed (1) hide show
  1. audio_tools.py +0 -16
audio_tools.py CHANGED
@@ -26,22 +26,6 @@ class TranscribeAudioTool(Tool):
26
 
27
  transcribe_audio_tool = TranscribeAudioTool()
28
 
29
- @tool
30
- def transcribe_audio(audio: str) -> str:
31
- """
32
- Transcribe an audio file
33
- Args:
34
- audio: The audio file in base64 format
35
- Returns:
36
- The transcribed text
37
- """
38
- model = InferenceClient(model="openai/whisper-large-v3", token=os.getenv("HUGGINGFACE_API_KEY"))
39
- audio_data = base64.b64decode(audio)
40
- audio_segment = AudioSegment.from_file(BytesIO(audio_data))
41
- result = model.automatic_speech_recognition(audio_segment)
42
- return result["text"]
43
-
44
-
45
  @tool
46
  def audio_to_base64(file_path: str) -> str:
47
  """
 
26
 
27
  transcribe_audio_tool = TranscribeAudioTool()
28
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  @tool
30
  def audio_to_base64(file_path: str) -> str:
31
  """