Spaces:
Sleeping
Sleeping
Fix audio tools
Browse files- audio_tools.py +3 -3
audio_tools.py
CHANGED
|
@@ -9,9 +9,9 @@ from huggingface_hub import InferenceClient
|
|
| 9 |
|
| 10 |
class TranscribeAudioTool(Tool):
|
| 11 |
name = "transcribe_audio"
|
| 12 |
-
description = "Transcribe an audio file"
|
| 13 |
inputs = {
|
| 14 |
-
"audio": {"type": "any", "description": "The audio file in base64 format or as an AudioSegment object"}
|
| 15 |
}
|
| 16 |
output_type = "string"
|
| 17 |
|
|
@@ -45,7 +45,7 @@ class TranscribeAudioTool(Tool):
|
|
| 45 |
transcribe_audio_tool = TranscribeAudioTool()
|
| 46 |
|
| 47 |
@tool
|
| 48 |
-
def
|
| 49 |
"""
|
| 50 |
Convert an audio file to base64 format
|
| 51 |
Args:
|
|
|
|
| 9 |
|
| 10 |
class TranscribeAudioTool(Tool):
|
| 11 |
name = "transcribe_audio"
|
| 12 |
+
description = "Transcribe an audio file (in base64 format or as an AudioSegment object)"
|
| 13 |
inputs = {
|
| 14 |
+
"audio": {"type": "any", "description": "The audio file in base64 format or as an AudioSegment object only"}
|
| 15 |
}
|
| 16 |
output_type = "string"
|
| 17 |
|
|
|
|
| 45 |
transcribe_audio_tool = TranscribeAudioTool()
|
| 46 |
|
| 47 |
@tool
|
| 48 |
+
def audio_to_base64_from_file_path(file_path: str) -> str:
|
| 49 |
"""
|
| 50 |
Convert an audio file to base64 format
|
| 51 |
Args:
|