Skip to main content
Glama

get_duration

Calculate the total duration in seconds of a given audio time series using audio analysis. Input the path to the audio time series to receive precise duration measurement.

Instructions

Returns the total duration (in seconds) of the given audio time series.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
path_audio_time_series_yYes

Implementation Reference

  • The handler function for the 'get_duration' tool. It loads the audio time series from a CSV file using np.loadtxt and computes the duration using librosa.get_duration.
    @mcp.tool() def get_duration(path_audio_time_series_y: str) -> float: """ Returns the total duration (in seconds) of the given audio time series. """ y = np.loadtxt(path_audio_time_series_y, delimiter=";") return librosa.get_duration(y=y)

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hugohow/mcp-music-analysis'

If you have feedback or need assistance with the MCP directory API, please join our Discord server