Peter Michael Gits Claude commited on
Commit ·
f677de5
1
Parent(s): 225c499
fix: Resolve Gradio client FileData validation error
Browse files- Use handle_file() to create proper FileData objects for Gradio API calls
- Fixes "meta field must be explicitly provided" validation error
- Ensures Gradio client passes correctly formatted file metadata
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- core/mcp_audio_handler.py +5 -1
- version.py +2 -2
core/mcp_audio_handler.py
CHANGED
|
@@ -600,8 +600,12 @@ class MCPAudioHandler:
|
|
| 600 |
try:
|
| 601 |
print(f"🎤 HTTP STT: Trying Gradio endpoint: {endpoint}")
|
| 602 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 603 |
result = client.predict(
|
| 604 |
-
|
| 605 |
"auto", # language
|
| 606 |
"base", # model_size
|
| 607 |
True, # return_timestamps
|
|
|
|
| 600 |
try:
|
| 601 |
print(f"🎤 HTTP STT: Trying Gradio endpoint: {endpoint}")
|
| 602 |
|
| 603 |
+
# Create proper FileData object for Gradio client
|
| 604 |
+
from gradio_client import handle_file
|
| 605 |
+
file_data = handle_file(audio_file_path)
|
| 606 |
+
|
| 607 |
result = client.predict(
|
| 608 |
+
file_data, # audio file as FileData object
|
| 609 |
"auto", # language
|
| 610 |
"base", # model_size
|
| 611 |
True, # return_timestamps
|
version.py
CHANGED
|
@@ -2,8 +2,8 @@
|
|
| 2 |
Version information for ChatCal Voice-Enabled AI Assistant
|
| 3 |
"""
|
| 4 |
|
| 5 |
-
__version__ = "0.8.
|
| 6 |
-
__build_date__ = "2025-08-
|
| 7 |
__description__ = "VoiceCal - Voice-Enabled AI Scheduling Assistant with Whisper corruption detection and alternative STT models"
|
| 8 |
|
| 9 |
def get_version_info():
|
|
|
|
| 2 |
Version information for ChatCal Voice-Enabled AI Assistant
|
| 3 |
"""
|
| 4 |
|
| 5 |
+
__version__ = "0.8.1"
|
| 6 |
+
__build_date__ = "2025-08-23T04:00:00"
|
| 7 |
__description__ = "VoiceCal - Voice-Enabled AI Scheduling Assistant with Whisper corruption detection and alternative STT models"
|
| 8 |
|
| 9 |
def get_version_info():
|