Skip to content
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

Add support for websocket server to start_speech_synth #79

Closed
MayamaTakeshi opened this issue Mar 7, 2024 · 1 comment
Closed

Add support for websocket server to start_speech_synth #79

MayamaTakeshi opened this issue Mar 7, 2024 · 1 comment

Comments

@MayamaTakeshi
Copy link
Owner

MayamaTakeshi commented Mar 7, 2024

Sometimes we might need to interact with production system and speech synth from flite (English only) will not fit.
So we could implement support for google tts, amazon polly etc but this would complicate development of the tool so instead of adding support for a multitude of TTS engines in sip-lab we could just establish a WebSocket connection to a Speech Server and that Speech Server would take care to talk with TTS engines.
This would also avoid things like having to store credentials in the machine where sip-lab runs and the server can control usage limits etc.
The function call would be like this:

sip.call.start_speech_synth(call_id, {
  text: 'hello world',
  server_url: 'ws://127.0.0.1/speech_synth',
  engine: 'gss',
  voice: 'en-US-Standard-A',
  language: 'en-US',
  times: 1, // number of times the text should be played
  media_id: 0, // optional
})
@MayamaTakeshi
Copy link
Owner Author

Check Issue 3239 from pjproject:

Is pjproject plan to support websocket transport?
Mybe we can firstly write the websocket library.
I have written some code, maybe give some help. Here is my test code project:
pjwebsock
which is based on pjlib.
The Code has been tested good as client and server on linux x86_64
But the code is ugly, should continue develop:
independent http layer (http encode/decode)
transport layer should more general (not only for websocket)
thread safe

I forked pjwebsock: https://github.com/MayamaTakeshi/pjwebsock

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant