import { SyllableSDK } from "syllable-sdk";
const syllableSDK = new SyllableSDK({
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
});
async function run() {
const result = await syllableSDK.sessions.latency.getById({
sessionId: "<id>",
});
console.log(result);
}
run();{
"session_id": "<string>",
"timeline": [
{
"timestamp": "2023-11-07T05:31:56Z",
"measurement_start": "2023-11-07T05:31:56Z",
"category": "tts",
"label": "<string>",
"unit_type": "minutes",
"value": 123,
"value_str": "<string>",
"time_delta": "<string>",
"metadata": [
"<string>"
]
}
],
"summary": [
{
"category": "tts",
"event_count": 123,
"sum_ms": 123,
"sum_str": "<string>",
"average_ms": 123,
"average_str": "<string>",
"sub_category": "<string>"
}
]
}import { SyllableSDK } from "syllable-sdk";
const syllableSDK = new SyllableSDK({
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
});
async function run() {
const result = await syllableSDK.sessions.latency.getById({
sessionId: "<id>",
});
console.log(result);
}
run();{
"session_id": "<string>",
"timeline": [
{
"timestamp": "2023-11-07T05:31:56Z",
"measurement_start": "2023-11-07T05:31:56Z",
"category": "tts",
"label": "<string>",
"unit_type": "minutes",
"value": 123,
"value_str": "<string>",
"time_delta": "<string>",
"metadata": [
"<string>"
]
}
],
"summary": [
{
"category": "tts",
"event_count": 123,
"sum_ms": 123,
"sum_str": "<string>",
"average_ms": 123,
"average_str": "<string>",
"sub_category": "<string>"
}
]
}Successful Response
This is a report of the time spent in each operation during this session. It contains a timeline, which lists the operations in the order they were executed, and a summary, which aggregates the operations by category and sub-category.