Skip to content

Updated doc renamed transcription to Voicegain SIP Media Stream B2BUA #75

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified freeswitch/transcription-proxy/FSProxy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 15 additions & 6 deletions freeswitch/transcription-proxy/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
![FSProxy](./FSProxy.png)

# FreeSWITCH Transcription Proxy
Proxy your SIP call via our FreeSWITCH docker and get the transcript of the call audio submitted to a websocket service.
# Voicegain SIP Media Stream B2BUA
Voicegain offers a highly scalable, reliable and fully contained SIP Media Stream B2BUA to address the challenge discussed above. This B2BUA is a containerized network element that is deployed in the same network as the premise-based contact center. From a SIP Protocol standpoint, this Media Stream Back-to-Back User Agent (B2BUA) acts as a transparent media relay while forking SIP RTP media streams to real-time Speech-to-Text..

Please refer to this link for more information https://www.voicegain.ai/post/accessing-real-time-media-streams-generative-ai

```Steps for setting up websocket service to receive transciption results in realtime```
# 1) Install required python pacakges
Expand Down Expand Up @@ -38,9 +40,12 @@ python ws_server.py
# 5) Modify config.ini for Freeswitch docker
A sample config.ini can be found in this repository.
```ini
# This is the SIP proxy host where you will be sending SIP traffic to
# This is the SIP B2BUA host where you will be sending SIP traffic to
FREESWITCH_HOST_DOMAIN=fs1lab.ascalon.ai
# If this value is present then this IP used as SIP trunk to make outbound calls
SIP_GATEWAY_IP=10.1.0.4:64793
# This is the final SIP destination domain where will be proxying to.
#if SIP_GATEWAY_IP is ip mentioned above then this below value will be ignored
DESTINATION_DOMAIN=fs.ascalon.ai:5080
# this main voicegain API gateway URL
VG_GATEWAY_URL=https://api.voicegain.ai/v1/asr/transcribe/async
Expand All @@ -56,6 +61,10 @@ RIGHT_CHANNEL_NAME=CALLER2
#words - words with confidence and timing info [also sent over websocket]
#segments -- segments (or partial hypotheses) [also sent over websocket, note that latency of segments is higher than that of words by about 300-500ms]]
CONTENT_INCREMENTAL=words
DIALED_NUMBER_MAPPING=1233:4567
SENSITIVITY=1
AUDIO_CAPTURE=true
NOAUDIOTIMEOUT=31000
```
# 6) Obtain FreeSWITCH proxy docker

Expand All @@ -71,15 +80,15 @@ With host networking:
-v option specifies local file path where config.ini is located this needs to be changed to where the file was copied.
-m to limit memory usage by freewitch docker so below example puts 1GB limit
```sh
docker run -d --name fsproxy --network=host -m 1g -v /Path_to/config.ini:/etc/config.ini us-docker.pkg.dev/voicegain-prod/vg-customer-private/freeswitch-transcription-proxy:0.8.0
docker run -d --name fsproxy --network=host -m 1g -v /Path_to/config.ini:/etc/config.ini us-docker.pkg.dev/voicegain-prod/vg-customer-private/freeswitch-transcription-proxy:0.14.6
```
With bridge networking:
```sh
-v option specifies local file path where config.ini is located this needs to be changed to where the file was copied.
docker run -d --name fsproxy -p -p 5060:5060/tcp -p 5060:5060/udp -v /Path_to/config.ini:/etc/config.ini us-docker.pkg.dev/voicegain-prod/vg-customer-private/freeswitch-transcription-proxy:0.8.0
docker run -d --name fsproxy -p -p 5060:5060/tcp -p 5060:5060/udp -v /Path_to/config.ini:/etc/config.ini us-docker.pkg.dev/voicegain-prod/vg-customer-private/freeswitch-transcription-proxy:0.14.6
```

Note 1: Be cartefull with the path to the config.ini on Windows systems
Note 1: Be carefull with the path to the config.ini on Windows systems

Note 2: If you get an error mentioning `parseConfigFile` and `Is a directory` the most likely the path to config.ini was incorrectly provided

Expand Down
6 changes: 6 additions & 0 deletions freeswitch/transcription-proxy/config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@ WEBSOCKET_SERVER=wss://mydomain.com:8765
LEFT_CHANNEL_NAME=CALLER1
RIGHT_CHANNEL_NAME=CALLER2
CONTENT_INCREMENTAL=words
SIP_GATEWAY_IP=10.1.0.4:64793
DIALED_NUMBER_MAPPING=1233:4567
SENSITIVITY=1
AUDIO_CAPTURE=true
NOAUDIOTIMEOUT=31000