tts-mcp
Version:
OpenAI Text to Speech APIを活用したコマンドラインツールとMCPサーバー
43 lines (42 loc) • 1.99 kB
TypeScript
import { CommandLineOptions, OpenAIVoice, OpenAITTSModel, OpenAIOutputFormat } from './types';
/**
* テキストファイルを読み込みます
* @param {string} filePath - 読み込むファイルのパス
* @returns {Promise<string>} ファイルの内容
*/
export declare function readTextFile(filePath: string): Promise<string>;
/**
* 出力先ディレクトリが存在するか確認し、存在しなければ作成します
* @param {string} outputPath - 出力ファイルパス
*/
export declare function ensureOutputDirectory(outputPath: string): Promise<void>;
/**
* 入力値を検証します
* @param {CommandLineOptions} options - 検証するオプション
* @throws {Error} 検証エラー
*/
export declare function validateOptions(options: CommandLineOptions): void;
/**
* デフォルトの出力ディレクトリに基づいて出力ファイル名を生成します
* @param {CommandLineOptions} options - オプション
* @returns {string} 出力ファイルパス
*/
export declare function getOutputPath(options: CommandLineOptions): string;
/**
* 音声タイプの有効性を検証し、有効な値を返す
* @param {string} voice 検証する音声タイプ
* @returns {OpenAIVoice} 有効な音声タイプ(無効な場合はデフォルト値)
*/
export declare function validateVoice(voice: string): OpenAIVoice;
/**
* モデルの有効性を検証し、有効な値を返す
* @param {string} model 検証するモデル
* @returns {OpenAITTSModel} 有効なモデル(無効な場合はデフォルト値)
*/
export declare function validateModel(model: string): OpenAITTSModel;
/**
* 出力フォーマットの有効性を検証し、有効な値を返す
* @param {string} format 検証する出力フォーマット
* @returns {OpenAIOutputFormat} 有効な出力フォーマット(無効な場合はデフォルト値)
*/
export declare function validateFormat(format: string): OpenAIOutputFormat;