• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
tr3ntg

tr3ntg

readback-api

API for readback.
Unlisted
Like
readback-api
Home
Code
3
backend
1
README.md
main.tsx
Branches
2
Pull requests
Remixes
History
Environment variables
7
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
6/15/2025
Viewing readonly version of main branch: v6
View latest version
README.md

Speech API Wrapper

This is a wrapper API for the LemonFox AI speech generation service. It simplifies the interface by only exposing the essential parameters while handling authentication and configuration internally.

Setup

  1. Set the LEMONFOX_API_KEY environment variable with your LemonFox API key
  2. The API will be available at the HTTP endpoint for this val

Endpoints

POST /api/speech

Generates speech from text using the LemonFox AI service.

Request Body:

{
  "voice": "sarah",
  "input": "Text to convert to speech"
}

Response:

{
  "audio": "_base_64_encoded_audio_here", 
  "word_timestamps": [
    {
      "word": "Hello!", 
      "start": 0.275, 
      "end": 0.7
    }
  ]
}

Error Response:

{
  "error": "Error message",
  "details": "Additional error details (optional)"
}

GET /health

Health check endpoint that returns the service status.

Response:

{
  "status": "ok",
  "timestamp": "2024-01-01T00:00:00.000Z"
}

Configuration

The API automatically configures:

  • response_format: Always set to "mp3"
  • word_timestamps: Always set to true

Only voice and input parameters need to be provided by the client.

FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.