tts-mcp
Version:
OpenAI Text to Speech APIを活用したコマンドラインツールとMCPサーバー
43 lines (42 loc) • 1.04 kB
TypeScript
import { VALID_VOICES, VALID_MODELS, VALID_FORMATS } from './constants';
export type OpenAIVoice = typeof VALID_VOICES[number];
export type OpenAITTSModel = typeof VALID_MODELS[number];
export type OpenAIOutputFormat = typeof VALID_FORMATS[number];
/**
* テキスト音声変換のオプション
*/
export interface TTSOptions {
text: string;
outputPath?: string;
model: OpenAITTSModel;
voice: OpenAIVoice;
speed: number;
format: OpenAIOutputFormat;
instructions?: string;
apiKey: string;
}
/**
* コマンドラインオプション
*/
export interface CommandLineOptions {
text?: string;
file?: string;
output?: string;
model?: OpenAITTSModel;
voice?: OpenAIVoice;
speed?: number;
format?: OpenAIOutputFormat;
instructions?: string;
apiKey?: string;
logFile?: string;
}
/**
* MCPサーバー設定
*/
export interface MCPServerConfig {
model: OpenAITTSModel;
voice: OpenAIVoice;
format: OpenAIOutputFormat;
apiKey: string;
logFile?: string;
}