Cutom LLM is weird
# support
p
Ok, so I have custom LLM setup that handles everything, all I need VAPI for is
transcribing/tts
>
phone call
, all custom llm examples use some weird framework and just pipes through the stuff to open AI, I just want to get call recipient voice transcribed to text and then my LLM responds with text that should be TTSed to whoever i'm calling. Thats it. Why is it so complicated in here? I just want to send text so that vapi TTS it for call recipient. How do I format the reponse so vapi just TTSes the text? TL;DR I want to: 1. Receive transcription as text (Done) 2. My LLM setup answers that with text. 3. I want to send that text back to VAPI so ir TTSes it to call recipient (How do I do this?) 4. Loop 1-3 until call ends.
v
You can continue this conversation by mentioning me in the message.
@Pigeon I understand you want to streamline the process of using VAPI for text-to-speech during a phone call. To have VAPI convert your LLM's text responses into speech for the call recipient, you'll need to format your text response according to VAPI's requirements for their TTS service. Here's a simple format you can use: 1. Ensure your text response is clear and in a plain text format. 2. Use the PlayHT voice provider and select the voice labeled Jennifer (female, en-US) for the TTS conversion. 3. Send the text to VAPI's TTS endpoint, specifying the voice you've chosen. The process would look something like this:
Copy code
plaintext
{
  "text": "Your LLM's response here",
  "voice": "Jennifer",
  "language": "en-US"
}
You would send this payload to the VAPI's TTS service. Once the text is converted to speech, VAPI will handle the delivery of the spoken message to the call recipient. For the loop, you would continue to: 1. Receive the transcription as text. 2. Have your LLM generate a response. 3. Format the response as shown above and send it to VAPI for TTS. 4. VAPI will then play the TTS to the call recipient. Repeat steps 1-4 until the call ends. If you need the specific API endpoint or further assistance with the integration, please let me know, and I'll be happy to help! If there are any additional features or specific configurations you need, please ask support for more info on this.
p
@Vapi link me documentation about this exact formatting.
v
@Pigeon Please ask support for more info on this.
p
I added my endpoint url to vapi assistant with custom llm, I trigger outboud call, i pick up, I hear initial message defined in vapi assistant. I anwer, I get response to my endpoint, My llm generates answer which I want to send back for VAPI to TTS to me in the call. Whats the structure that I send that response so I hear my answer on the phone?
s
Hey @Pigeon checking if this is resolved?
p
Yes, thank you