Skip to main content
Glama
balloonf

Windows TTS MCP Server

by balloonf

speak_quiet

Convert text to speech at a low volume using Windows TTS MCP Server, enabling discreet audio playback for private or quiet environments.

Instructions

텍스트를 작은 볼륨으로 읽어줍니다

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes

Implementation Reference

  • The primary handler for the 'speak_quiet' tool. Decorated with @mcp.tool() for automatic registration in FastMCP. Splits long text into chunks using split_text_for_tts, executes TTS playback in a background thread using a nested _speak_quiet helper that calls powershell_tts with volume=50 for quiet speech, and returns a status message.
    @mcp.tool()
    def speak_quiet(text: str) -> str:
        """텍스트를 작은 볼륨으로 읽어줍니다"""
        try:
            # 텍스트 분할
            text_chunks = split_text_for_tts(text, 400)
            total_chunks = len(text_chunks)
            
            def _speak_quiet():
                for i, chunk in enumerate(text_chunks, 1):
                    safe_print(f"[QUIET TTS] {i}/{total_chunks} 부분 재생 중: {chunk[:50]}...")
                    powershell_tts(chunk, rate=0, volume=50)  # 작은 볼륨
                    if i < total_chunks:
                        time.sleep(0.5)
            
            thread = threading.Thread(target=_speak_quiet, daemon=True)
            thread.start()
            
            if total_chunks > 1:
                return f"[QUIET] 작은 볼륨 재생 시작 ({total_chunks}개 부분): '{text[:50]}...'"
            else:
                return f"[QUIET] 작은 볼륨 재생 시작: '{text[:50]}...'"
            
        except Exception as e:
            return f"[ERROR] 작은 볼륨 재생 오류: {str(e)}"
  • Core helper function that executes TTS via PowerShell with configurable rate and volume. Called by speak_quiet with rate=0, volume=50 to produce quiet speech. Handles process management, text escaping, and error handling.
    def powershell_tts(text: str, rate: int = 0, volume: int = 100) -> bool:
        """PowerShell을 사용한 TTS 실행"""
        process = None
        try:
            if platform.system() != "Windows":
                safe_print("[ERROR] Windows가 아닙니다")
                return False
            
            # 텍스트에서 작은따옴표 이스케이프 처리
            escaped_text = text.replace("'", "''")
            
            # PowerShell TTS 명령어
            cmd = [
                "powershell", "-Command",
                f"Add-Type -AssemblyName System.Speech; "
                f"$synth = New-Object System.Speech.Synthesis.SpeechSynthesizer; "
                f"$synth.Rate = {rate}; "
                f"$synth.Volume = {volume}; "
                f"$synth.Speak('{escaped_text}'); "
                f"$synth.Dispose()"
            ]
            
            # 프로세스 시작
            process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
            
            # 실행 중인 프로세스 목록에 추가
            with process_lock:
                running_processes.append(process)
            
            # 프로세스 완료 대기
            stdout, stderr = process.communicate(timeout=180)
            
            # 완료된 프로세스 목록에서 제거
            with process_lock:
                if process in running_processes:
                    running_processes.remove(process)
            
            if process.returncode == 0:
                safe_print(f"[SUCCESS] TTS 완료: {text[:30]}...")
                return True
            else:
                safe_print(f"[ERROR] TTS 오류: {stderr}")
                return False
                
        except subprocess.TimeoutExpired:
            safe_print("[WARNING] TTS 시간 초과")
            if process:
                process.kill()
                with process_lock:
                    if process in running_processes:
                        running_processes.remove(process)
            return False
        except Exception as e:
            safe_print(f"[ERROR] TTS 예외: {e}")
            if process:
                try:
                    process.kill()
                    with process_lock:
                        if process in running_processes:
                            running_processes.remove(process)
                except:
                    pass
            return False
  • Helper function to split long text into TTS-friendly chunks (max 500 chars by default, 400 for speak_quiet). Ensures natural sentence boundaries for smooth playback. Used by speak_quiet.
    def split_text_for_tts(text: str, max_length: int = 500) -> list:
        """텍스트를 TTS용으로 적절히 분할"""
        if len(text) <= max_length:
            return [text]
        
        # 문장 단위로 분할 시도
        import re
        sentences = re.split(r'[.!?。!?]\s*', text)
        
        chunks = []
        current_chunk = ""
        
        for sentence in sentences:
            # 문장이 너무 긴 경우 더 작게 분할
            if len(sentence) > max_length:
                # 쉼표나 기타 구두점으로 분할
                sub_parts = re.split(r'[,;:\s]\s*', sentence)
                for part in sub_parts:
                    if len(current_chunk + part) <= max_length:
                        current_chunk += part + " "
                    else:
                        if current_chunk.strip():
                            chunks.append(current_chunk.strip())
                        current_chunk = part + " "
            else:
                # 현재 청크에 문장을 추가할 수 있는지 확인
                if len(current_chunk + sentence) <= max_length:
                    current_chunk += sentence + ". "
                else:
                    if current_chunk.strip():
                        chunks.append(current_chunk.strip())
                    current_chunk = sentence + ". "
        
        # 마지막 청크 추가
        if current_chunk.strip():
            chunks.append(current_chunk.strip())
        
        return chunks
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool reads text at low volume, which implies a read-only operation, but doesn't disclose other traits: whether it requires TTS to be initialized, if it queues speech or interrupts current speech, rate limits, error conditions, or what happens if no text is provided. For a tool with zero annotation coverage, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence in Korean that directly states the tool's function. It's front-loaded with the core action ('reads text at a low volume') and has no redundant or unnecessary words. Every part of the sentence earns its place by specifying the action and key behavioral trait (low volume).

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (speech synthesis with volume control), no annotations, no output schema, and 0% schema description coverage, the description is incomplete. It lacks details on prerequisites (e.g., TTS status), behavioral nuances (e.g., interaction with other speech tools), error handling, and output format. The description provides a basic purpose but doesn't compensate for the missing structured data.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description mentions '텍스트' (text) as the input, aligning with the single parameter 'text' in the schema. Schema description coverage is 0%, so the schema provides no additional param details. The description adds basic semantics by indicating the parameter is text to be read, but doesn't specify constraints like length, language, or format. With 0% schema coverage, the description partially compensates but not fully.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: '텍스트를 작은 볼륨으로 읽어줍니다' (reads text at a low volume). It specifies the verb ('reads') and resource ('text'), and distinguishes it from siblings like 'speak' (likely normal volume) and 'speak_slow'/'speak_fast' (different speech characteristics). However, it doesn't explicitly mention it's for TTS/speech synthesis, which could be inferred from sibling tools but isn't stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context through '작은 볼륨으로' (at a low volume), suggesting this tool should be used when quiet speech is needed versus normal-volume alternatives. However, it doesn't explicitly state when to use this tool versus siblings like 'speak' or 'speak_slow', nor does it mention prerequisites or exclusions (e.g., whether it requires TTS to be active). The guidance is implied but not comprehensive.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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/balloonf/widows_tts_mcp'

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