Skip to main content
Glama
balloonf

Windows TTS MCP Server

by balloonf

stop_speech

Stop all currently playing speech instantly using this tool, designed for precise playback control in Windows TTS MCP Server. Ideal for managing text-to-speech interruptions effectively.

Instructions

현재 재생 중인 모든 음성을 중지합니다

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'stop_speech' tool. It terminates all running TTS processes managed in the global 'running_processes' list, clears the list, and additionally kills PowerShell processes containing 'Speech' in their command line.
    @mcp.tool()
    def stop_speech() -> str:
        """현재 재생 중인 모든 음성을 중지합니다"""
        try:
            stopped_count = 0
            
            with process_lock:
                # 실행 중인 모든 TTS 프로세스 종료
                for process in running_processes[:]:  # 복사본으로 순회
                    try:
                        if process.poll() is None:  # 아직 실행 중인 프로세스
                            process.terminate()
                            time.sleep(0.1)
                            if process.poll() is None:  # 여전히 실행 중이면 강제 종료
                                process.kill()
                            stopped_count += 1
                        running_processes.remove(process)
                    except Exception as e:
                        safe_print(f"프로세스 종료 오류: {e}")
                
                running_processes.clear()
            
            # PowerShell 프로세스도 강제 종료
            try:
                # Windows에서 모든 PowerShell TTS 프로세스 찾아서 종료
                subprocess.run([
                    "powershell", "-Command",
                    "Get-Process | Where-Object {$_.ProcessName -eq 'powershell' -and $_.CommandLine -like '*Speech*'} | Stop-Process -Force"
                ], capture_output=True, timeout=5)
            except:
                pass
            
            if stopped_count > 0:
                return f"[STOP] {stopped_count}개의 음성 재생을 중지했습니다"
            else:
                return "[INFO] 현재 재생 중인 음성이 없습니다"
                
        except Exception as e:
            return f"[ERROR] 음성 중지 오류: {str(e)}"
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