Pipecat plugin for Munsit Arabic speech-to-text and text-to-speech
Project description
pipecat-plugins-munsit
Pipecat services for Munsit: Arabic speech-to-text (live WebSocket streaming) and text-to-speech (HTTP streaming).
This package supersedes pipecat-plugins-faseeh, which is now a deprecation shim
that re-exports these services.
Installation
pip install pipecat-plugins-munsit
Requires Python 3.10+ and pipecat-ai >= 1.5.0.
Speech-to-Text (live streaming)
MunsitSTTService streams audio to Munsit's live WebSocket API
(wss://api.munsit.com/api/v1/listen) and pushes interim and final
transcription frames. Arabic only (v1).
from pipecat_plugins_munsit import MunsitSTTService
stt = MunsitSTTService(
api_key="your-api-key", # or MUNSIT_API_KEY env var
endpointing_ms=800, # server-side silence window that ends a turn (100-5000)
hotwords=["فصيح", "منصت"], # custom vocabulary biasing (<=200 entries, <=40 chars)
)
Per-turn enrichment (speaker gender, sentiment)
async def on_enrichment(event: dict):
if event["type"] == "Gender":
print("speaker gender:", event["label"], event["score"])
elif event["type"] == "Sentiment":
print("turn sentiment:", event["label"], event["score"])
stt = MunsitSTTService(api_key="...", on_enrichment=on_enrichment)
Notes
- Input at 8 kHz / 16 kHz is sent as-is; other pipeline rates are resampled to 16 kHz client-side.
- Idle connections are kept open with protocol
KeepAlivecontrol frames (never silence, which would be billed as audio). - A final with
TranscriptionFrame.finalized == Falseis a forced split inside one long utterance (the server splits turns at ~60s of unbroken speech), not the end of the user's turn. smart_turn(on by default) gates end-of-turn on the server's semantic turn-completion model, reducing premature cuts; passsmart_turn=Falseto end turns on silence alone.
Text-to-Speech
import aiohttp
from pipecat_plugins_munsit import MunsitTTSService
async with aiohttp.ClientSession() as session:
tts = MunsitTTSService(
api_key="your-api-key", # or MUNSIT_API_KEY env var
aiohttp_session=session,
voice_id="ar-hijazi-female-2",
model="faseeh-v1-preview",
)
Streams PCM16 audio at 48 kHz mono by default (sample_rate=24000 also supported). stability (0.0-1.0) and speed
(0.7-1.2) are configurable at construction and runtime-updatable via
TTSUpdateSettingsFrame.
Full agent example
from pipecat.pipeline.pipeline import Pipeline
from pipecat_plugins_munsit import MunsitSTTService, MunsitTTSService
pipeline = Pipeline([
transport.input(),
MunsitSTTService(api_key="..."),
context_aggregator.user(),
llm,
MunsitTTSService(api_key="...", aiohttp_session=session),
transport.output(),
context_aggregator.assistant(),
])
Development
pip install -e ".[dev]"
pytest tests/ -q
Releases are published to PyPI by pushing a v* tag (see
.github/workflows/publish.yml; requires the PYPI_API_TOKEN repo secret).
License
Apache-2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pipecat_plugins_munsit-0.2.0.tar.gz.
File metadata
- Download URL: pipecat_plugins_munsit-0.2.0.tar.gz
- Upload date:
- Size: 21.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c1dc638a27eb78bef1a456ed1c1a184fe3e97b9a84cb769580922261476aebf
|
|
| MD5 |
269a114b53ccc866c988fc6c04a3336d
|
|
| BLAKE2b-256 |
ff3aaf9c7ad24b1dc0b1962b5de800f649a5edc990d92928de52a6fdea193cc9
|
Provenance
The following attestation bundles were made for pipecat_plugins_munsit-0.2.0.tar.gz:
Publisher:
publish.yml on CNTXTFZCO0/pipecat-plugins-munsit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pipecat_plugins_munsit-0.2.0.tar.gz -
Subject digest:
2c1dc638a27eb78bef1a456ed1c1a184fe3e97b9a84cb769580922261476aebf - Sigstore transparency entry: 2103146118
- Sigstore integration time:
-
Permalink:
CNTXTFZCO0/pipecat-plugins-munsit@4fbe96c59c6e18cb626825f71801567680aa3e2c -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/CNTXTFZCO0
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4fbe96c59c6e18cb626825f71801567680aa3e2c -
Trigger Event:
push
-
Statement type:
File details
Details for the file pipecat_plugins_munsit-0.2.0-py3-none-any.whl.
File metadata
- Download URL: pipecat_plugins_munsit-0.2.0-py3-none-any.whl
- Upload date:
- Size: 16.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e91bbe0e181bf592805498d8c290c619a69ea109bed44cb45cd50825ceebb81
|
|
| MD5 |
230829273dcd7f53948eb2803d289893
|
|
| BLAKE2b-256 |
b678228d36f1aa37ff9d4c27d11d877cbd8e84d3534b32d6176afa065007eadc
|
Provenance
The following attestation bundles were made for pipecat_plugins_munsit-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on CNTXTFZCO0/pipecat-plugins-munsit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pipecat_plugins_munsit-0.2.0-py3-none-any.whl -
Subject digest:
6e91bbe0e181bf592805498d8c290c619a69ea109bed44cb45cd50825ceebb81 - Sigstore transparency entry: 2103146408
- Sigstore integration time:
-
Permalink:
CNTXTFZCO0/pipecat-plugins-munsit@4fbe96c59c6e18cb626825f71801567680aa3e2c -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/CNTXTFZCO0
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4fbe96c59c6e18cb626825f71801567680aa3e2c -
Trigger Event:
push
-
Statement type: