We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/IlyaGusev/academia_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
test_speech_to_text.py•763 B
import httpx
from academia_mcp.files import get_workspace_dir
from academia_mcp.tools import speech_to_text
async def test_speech_to_text_base(test_audio_url: str) -> None:
result = await speech_to_text(test_audio_url)
assert result is not None
assert "dancing in the masquerade" in str(result).lower()
async def test_speech_to_text_local(test_audio_url: str) -> None:
response = httpx.get(test_audio_url, timeout=10)
response.raise_for_status()
ext = test_audio_url.split(".")[-1]
with open(get_workspace_dir() / f"audio_file.{ext}", "wb") as fp:
fp.write(response.content)
result = await speech_to_text(f"audio_file.{ext}")
assert result is not None
assert "dancing in the masquerade" in str(result).lower()