Comments (5)
@teledoc2 do you know what audio format you are outputting to the stream? Twilio only accepts ulaw_8000
since this is what is supported by the publicly switched telephone network. You can see where we set this with ElevenLabs: https://github.com/twilio-labs/call-gpt/blob/main/services/tts-service.js#L20
from call-gpt.
thank you so much for the prompt response, yes both neets.ai and deepgram tts can produce output format ulaw_8000 (mulaw_8000 in neets.ai) and i added it as a param in the request, per docs, but still not able to pass the audio to twilio. When using base64 there is just a loud static and without base64 just silent and in both cases the terminal is showing no activity. Any advice would be appreciated. I just looked at openAI TTS and it seems to be a feasible solution so will try it next. Any other ideas would be greatly appreciated. Thanks so much! Abe
from call-gpt.
@teledoc2 Have you managed to successfully implement it with openAI TTS? I have tried but only hear static on my end. If you did, could you please share your solution?
from call-gpt.
Neets was fairly easy to implement as they support output in mulaw, worked without any issues. To get openAI TTS to work you would probably need to use something like wavefile to convert it from wav to mulaw.
const response = await fetch(
'https://api.neets.ai/v1/tts',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'xxxxxx',
accept: 'audio/wav',
},
body: JSON.stringify({
text: partialResponse,
voice_id: 'vits-eng-1',
fmt: 'mulaw',
params: {
model: 'vits'
}
})
}
)
from call-gpt.
@c0dr Thanks! Your code works well for Neets ai API.
Do you know how we can add fillers like 'Umm', 'Sure' or 'Let me think'? I'm planning to add fillers to reduce the perception of latency between the 'human voice input' and the 'tts of gpt response'.
from call-gpt.
Related Issues (20)
- Training Chatgpt with PDF, Doc or Website Scraper? HOT 1
- keeps ringing HOT 2
- 1s Latency Definitiion HOT 1
- Forward call HOT 1
- Text to Speech is not working ! HOT 2
- I get this issue HOT 8
- Getting click sounds and static sounds on the phone when run. HOT 6
- Interruption handling.
- no response HOT 4
- Giving a Knowledge Base for the Bot HOT 2
- Please create another option for speech to text using Deepgram Aurora HOT 3
- Just added typescript support for the repo and typed most of the files HOT 4
- Got the repo kinda working HOT 12
- how i can run this code and voice call to gpt HOT 2
- i get this error anyone can tell me how can i solve this! HOT 4
- Wrong inputs in function call HOT 1
- Deepgram for TTS HOT 3
- <Record> Flag on TwiML not working. HOT 1
- Error: Cannot find module '../firebase-db.json' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from call-gpt.