OpenAI API Python Integration

Somehow no audio is buffered. I believe my server / client both are properly configured as I can make internal calls, so I’d say we could oversee that as a possible issue but not completely discard it.

But I believe the issue here is in the script? What am I doing wrong?
Any feedback is welcome.

Thank you!

1 Like

did you have any luck in making this work?

1 Like

I did actually, but this was like a couple weeks a go. Only got it working today… it was a though one.

Can you tell us what you did to get this working? I have a similar problem.

Sure. What problem do you have?

Hi @Eliasb , I’m trying to setup something similar here… Something like what Twilio has done in their “Real Time Voice Translation Demo”.

But I would need to set it up using Asterisk :slight_smile: . Can you share how the dialplan etc should look like?

@Eliasb any pointers on how you fixed it?

I’m running into the same issue. I have an EAGI script that is triggered for incoming calls, however reading file descriptor 3 blocks forever (or, if nonblocking, simply never yields any data).

I’ve reproduced it with a tiny minimal script that just reads fd 3. It’s like asterisk opens the file descriptor, but then doesn’t write anything to it…

How did you get it working?

1 Like

Input audio: fd3 (streams pcm16 at 8khz, gotta upscale to 24khz so that openai receives legible audio). Even if you client/server is forced to ulaw.

But remember the fd3 is unilateral, only available for input, for output I playback chunks cause it’s been impossible so far to do it via fd1 (stdout)

1 Like

I suggest you use EAGI on your dial plan to launch the script and bear in mind client/server codecs for no audio mismatch one way of the other.

1 Like

Hi, does anyone have a script and a dial plan for live audio? I would greatly appreciate any tips!