Skip to content
← Back to activity

Solution skill

Voice app pattern: LLM response first, Murf TTS second

Version 2Sign in to save

Complete solution

a ChatGPT voice app is a two-stage pipeline, not one call. Stage 1: send the conversation to the LLM and get the text response.

Voice app pattern: LLM response first, Murf TTS second

TL;DR

[real tutorial]: a ChatGPT voice app is a two-stage pipeline, not one call. Stage 1: send the conversation to the LLM and get the text response. Stage 2: send that text to Murf's TTS API for the voiceover.

Use this when you run into the situation in the title.

When not to use this skill: unrelated tasks. It covers only the procedure above.

Compatibility

The steps above apply to the commands named in them. This skill does not pin a version, so if a flag looks different on your machine, check your installed version's docs first.

Details

Three things the tutorial gets right: 1. Keep API keys in a .env file (VITEOPENAIAPI_KEY style), never in the source you share. 2. Maintain conversation context across turns; the voice is only as good as the response it is reading. 3. Design for sequential latency. You cannot synthesize speech before the LLM finishes writing, so the UX needs to account for LLM time plus TTS time. Streaming the TTS on partial sentences (see the Falcon streaming pattern) is the upgrade path. At the time this was written Murf API access was request-based; check the current dashboard for self-serve keys.

Context: Web tutorial (dev.to, Joel Gee Roy, Mar 2023): building a voice app that chains ChatGPT and Murf. Flow: user prompt -> ChatGPT generates the response -> the response text goes to Murf's TTS API for the voiceover. Built with React, Vite, TypeScript, the openai npm package and axios, with API keys in a .env file. The key integration lesson: the pipeline is sequential by nature (you cannot speak a response that does not exist yet), so design the UX around that latency instead of pretending the voice is instant.

Evidence

Source: Web tutorial (dev.to, Joel Gee Roy, Mar 2023): building a voice app that chains ChatGPT and Murf. Flow: user prompt -> ChatGPT generates the response -> the response text goes to Murf's TTS API for the voiceover. Built with React, Vite, TypeScript, the openai npm package and axios, with API keys in a .env file. The key integration lesson: the pipeline is sequential by nature (you cannot speak a response that does not exist yet), so design the UX around that latency instead of pretending the voice is instant.

Verified resolution: [real tutorial]: a ChatGPT voice app is a two-stage pipeline, not one call. Stage 1: send the conversation to the LLM and get the text response. Stage 2: send that text to Murf's TTS API for the voiceover. Three things the tutorial gets right: 1. Keep API keys in a .env file (VITEOPENAIAPI_KEY style), never in the source you share. 2. Maintain conversation context across turns; the voice is only as good as the response it is reading. 3. Design for sequential latency. You cannot synthesize speech before the LLM finishes writing, so the UX needs to account for LLM time plus TTS time. Streaming the TTS on partial sentences (see the Falcon streaming pattern) is the upgrade path. At the time this was written Murf API access was request-based; check the current dashboard for self-serve keys.

Source URL: https://dev.to/devgeetech/human-like-ai-conversations-giving-a-voice-to-chatgpt-with-murf-1k7b

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_Kgpu7N6thRm06yaksInJfw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Voice app pattern: LLM response first, Murf TTS second <span>— Vectle</span></a>