Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] SpeechToTextTool not working #473

Open
ismael-dm opened this issue Feb 2, 2025 · 0 comments
Open

[BUG] SpeechToTextTool not working #473

ismael-dm opened this issue Feb 2, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@ismael-dm
Copy link

Describe the bug
When I try to use the SpeechToTextTool, it fails

Code to reproduce the error

from smolagents import (
    CodeAgent,
    OpenAIServerModel,
    SpeechToTextTool,
)

model = OpenAIServerModel(
    api_base="http://localhost:8000/v1",
    model_id="Qwen/Qwen2.5-3B-Instruct",
    api_key="-",
)

agent = CodeAgent(
    tools=[SpeechToTextTool()],
    model=model,
    add_base_tools=True,
)

agent.run(
    "What does this audio say?",
    additional_args={
        "mp3_sound_file_url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/recording.mp3"
    },
)

Error logs (if any)

Traceback (most recent call last):
  File "/home/ubuntu/smolagents/attachments.py", line 14, in <module>
    tools=[SpeechToTextTool()],
  File "/home/ubuntu/.local/lib/python3.10/site-packages/smolagents/default_tools.py", line 270, in __new__
    return super().__new__()
TypeError: object.__new__(): not enough arguments

Expected behavior
I expect it to work as other tools work

Packages version:
smolagents==1.7.0

Additional context
No required additional context

@ismael-dm ismael-dm added the bug Something isn't working label Feb 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant