check_engine_status
Verify the operational status of the AivisSpeech engine to ensure seamless text-to-speech conversion for Japanese AI assistants. Use this tool to monitor engine availability and functionality.
Instructions
Check if AivisSpeech engine is running
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:322-348 (handler)The main handler for the 'check_engine_status' tool. It checks if the AivisSpeech engine is running using the client and retrieves the version if available, returning a text response.case 'check_engine_status': { try { const isRunning = await client.isEngineRunning(); const version = isRunning ? await client.getVersion() : null; return { content: [ { type: 'text', text: isRunning ? `AivisSpeech engine is running (version: ${version})` : 'AivisSpeech engine is not running. Please start the engine at http://127.0.0.1:10101', }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error checking engine status: ${error instanceof Error ? error.message : String(error)}`, }, ], isError: true, }; } }
- src/index.ts:76-82 (registration)Registration of the 'check_engine_status' tool as the only available tool when the engine is not running, including schema.name: 'check_engine_status', description: 'Check if AivisSpeech engine is running', inputSchema: { type: 'object', properties: {}, }, },
- src/index.ts:162-167 (registration)Registration of the 'check_engine_status' tool in the full list of available tools when the engine is running, including schema.name: 'check_engine_status', description: 'Check if AivisSpeech engine is running', inputSchema: { type: 'object', properties: {}, },
- src/aivisspeech-client.ts:190-197 (helper)Helper method isEngineRunning() in AivisSpeechClient class that checks engine status by attempting to call getVersion().async isEngineRunning(): Promise<boolean> { try { await this.getVersion(); return true; } catch { return false; } }
- src/aivisspeech-client.ts:66-79 (helper)Helper method getVersion() in AivisSpeechClient that fetches the engine version via HTTP GET to /version endpoint.async getVersion(): Promise<string> { try { const response: AxiosResponse<string> = await axios.get(`${this.baseUrl}/version`); return response.data; } catch (error: any) { if (error.response) { throw new Error(`Failed to get version: HTTP ${error.response.status} - ${error.response.data}`); } else if (error.request) { throw new Error(`Failed to get version: No response from ${this.baseUrl} - ${error.message}`); } else { throw new Error(`Failed to get version: ${error.message}`); } } }