Skip to main content
Glama

Fonoster MCP Server

Official
by fonoster
MIT License
118
7,325
  • Apple
  • Linux
.intro.md2.63 kB
voice ================= [![Voice](https://img.shields.io/badge/voice-api-brightgreen.svg)](https://fonoster.com) [![Version](https://img.shields.io/npm/v/@fonoster/voice.svg)](https://npmjs.org/package/@fonoster/voice) [![Downloads/week](https://img.shields.io/npm/dw/@fonoster/voice.svg)](https://npmjs.org/package/@fonoster/voice) [![License](https://img.shields.io/npm/l/@fonoster/voice.svg)](https://github.com/fonoster/fonoster/blob/main/package.json) The Voice module is a library for creating voice applications using the Fonoster API. It provides a simple way to create voice applications that can interact with the calling party using DTMF or speech recognition combined with simple verbs. * [Installation](#installation) * [Example](#example) * [Voice Response](#VoiceResponse) ## Installation ```sh-session $ npm install --save @fonoster/voice ``` ## Example A Voice Application is a server that controls a call's flow. A Voice Application can use any combination of the following verbs: - `Answer` - Accepts an incoming call - `Dial` - Passes the call to an Agent or a Number at the PSTN - `Hangup` - Closes the call - `Play` - Takes a URL or file and streams the sound back to the calling party - `Say` - Takes a text, synthesizes the text into audio, and streams back the result - `Gather` - Waits for DTMF or speech events and returns back the result - `SGather` - Returns a stream for future DTMF and speech results - `Stream` - Starts a stream to read and write audio into the call - `Record` - It records the voice of the calling party and saves the audio on the Storage sub-system - `Mute` - It tells the channel to stop sending media, effectively muting the channel - `Unmute` - It tells the channel to allow media flow Voice Application Example: ```typescript const VoiceServer = require("@fonoster/voice").default; const { GatherSource, VoiceRequest, VoiceResponse } = require("@fonoster/voice"); new VoiceServer().listen(async (req: VoiceRequest, voice: VoiceResponse) => { const { ingressNumber, sessionRef, appRef } = req; await voice.answer(); await voice.say("Hi there! What's your name?"); const { speech: name } = await res.gather({ source: GatherSource.SPEECH }); await voice.say("Nice to meet you " + name + "!"); await voice.say("Please enter your 4 digit pin."); const { digits } = await voice.gather({ maxDigits: 4, finishOnKey: "#" }); await voice.say("Your pin is " + digits); await voice.hangup(); }); // Your app will live at tcp://127.0.0.1:50061 // and you can easily publish it to the Internet with: // ngrok tcp 50061 ```

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/fonoster/fonoster'

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