Giter VIP home page Giter VIP logo

Comments (5)

cweems avatar cweems commented on July 29, 2024

@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.

teledoc2 avatar teledoc2 commented on July 29, 2024

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.

daniel-makarov avatar daniel-makarov commented on July 29, 2024

@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.

c0dr avatar c0dr commented on July 29, 2024

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.

SageWorks4925 avatar SageWorks4925 commented on July 29, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.