Skip to main content
skill CX Codex

speak-cost-tuning — Claude Code skill for Speak API cost control

speak-cost-tuning — a skill that tunes costs for a Speak API integration. It monitors usage, picks a tier, and makes audio processing cheaper.

MIT 1 installs ★ 2,935 updated 2026-11-01

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add jeremylongshore/tons-of-skills-marketplace --skill speak-cost-tuning -a claude-code
Open on GitHub

What speak-cost-tuning does

Speak runs GPT-4o for AI tutoring and Whisper for speech recognition, so your bill comes from two external services at once. This skill sets up cost tuning around that: configuration, a basic client check through @speak/language-sdk, and a curl call to https://api.speak.com/v1/health.

The config step reads SPEAK_API_KEY and SPEAK_APP_ID from the environment. A health check confirms the connection before you go further. The skill includes an error table for 401, 429, timeouts, and wrong audio codecs.

You need the speak-install-auth setup done first, with working API credentials. After cost tuning, the natural next step is speak-prod-checklist.

What it helps with

  • track token spend across GPT-4o and Whisper
  • pick a Speak tier that fits actual usage
  • keep audio processing from wasting money
  • verify the integration with a health check
  • handle 401, 429 and codec errors

Example prompts for the agent

  • Set up speak cost tuning for my Speak integration
  • Check that SPEAK_API_KEY works and the health endpoint responds
  • Tune speech recognition costs in the Speak project

How to install speak-cost-tuning

1Skills CLI (Vercel)

npx skills add jeremylongshore/tons-of-skills-marketplace --skill speak-cost-tuning -a claude-code

2Manually: put the files in place

~/.claude/skills/speak-cost-tuning/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/speak-cost-tuning/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about speak-cost-tuning

How do I install speak-cost-tuning in Claude Code?

Run npx skills add jeremylongshore/tons-of-skills-marketplace --skill speak-cost-tuning -a claude-code. The skill ends up at ~/.claude/skills/speak-cost-tuning/SKILL.md.

What does speak-cost-tuning do?

It tunes Speak API costs: monitors usage, helps with tier selection, and makes audio processing more efficient. Both GPT-4o and Whisper costs are in scope.

What does the skill require before use?

A completed speak-install-auth setup and valid SPEAK_API_KEY and SPEAK_APP_ID credentials. The configuration step depends on them.

Source text

SKILL.md · MIT
---
name: speak-cost-tuning
description: 'Optimize Speak API costs through usage monitoring, tier selection, and
  efficient audio processing.

  Use when implementing cost tuning,

  or managing Speak language learning platform operations.

  Trigger with phrases like "speak cost tuning", "speak cost tuning".

  '
allowed-tools: Read, Write, Edit, Bash(npm:*), Bash(curl:*), Grep
version: 1.14.0
license: MIT
author: Jeremy Longshore <[email protected]>
tags:
- saas
- speak
- api
compatibility: Designed for Claude Code
---
# Speak Cost Tuning

## Overview

Optimize Speak API costs through usage monitoring, tier selection, and efficient audio processing.

## Prerequisites

- Completed `speak-install-auth` setup
- Valid API credentials configured
- Understanding of Speak API patterns

## Instructions

### Step 1: Configuration

Configure cost tuning for your Speak integration. Speak uses OpenAI's GPT-4o for AI tutoring and Whisper for speech recognition.

```typescript
// speak_cost_tuning_config.ts
const config = {
  apiKey: process.env.SPEAK_API_KEY!,
  appId: process.env.SPEAK_APP_ID!,
  environment: process.env.NODE_ENV || 'development',
};
```

### Step 2: Implementation

```typescript
// Core implementation for speak cost tuning
import { SpeakClient } from '@speak/language-sdk';

const client = new SpeakClient(config);

// Production-ready implementation
async function setup() {
  const health = await client.health.check();
  console.log("Status:", health.status);
  return health;
}
```

### Step 3: Verification

```bash
curl -sf -H "Authorization: Bearer $SPEAK_API_KEY" https://api.speak.com/v1/health | jq .
```

## Output

- Speak Cost Tuning configured and verified
- Production-ready Speak integration
- Error handling and monitoring in place

## Error Handling

| Error | Cause | Solution |
|-------|-------|----------|
| 401 Unauthorized | Invalid API key | Verify SPEAK_API_KEY |
| 429 Rate Limited | Too many requests | Implement backoff |
| Connection timeout | Network issue | Check connectivity to api.speak.com |
| Audio format error | Wrong codec | Convert to WAV 16kHz mono |

## Resources

- [Speak Website](https://speak.com)
- [OpenAI Realtime API](https://platform.openai.com/docs/guides/realtime)
- [Speak GPT-4 Blog](https://speak.com/blog/speak-gpt-4)

## Next Steps

For production checklist, see `speak-prod-checklist`.

## Examples

**Basic**: Apply cost tuning with default settings for a standard Speak integration.

**Production**: Configure with monitoring, alerting, and team-specific language learning requirements.

© Jeremy Longshore · MIT · jeremylongshore/tons-of-skills-marketplace

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set139

The whole set →
finding-arbitrage-opportunities finding-arbitrage-opportunities compares top bid and ask prices for a crypto pair across exchanges, applies taker fees, and searches triangular cycles. Useful for checking price gaps. CX Codex +1 1installs routing-dex-trades routing-dex-trades — a skill that pulls quotes from 1inch, Paraswap, and 0x to find swap routes with lower slippage and gas. Use it before trading to compare venues or split a large order. CX Codex +1 1installs simulating-flash-loans simulating-flash-loans simulates flash loans across Aave V3, dYdX, and Balancer without spending real tokens. It estimates arbitrage and liquidation net profits, gas costs, and execution risks. CX Codex +1 1installs speak-hello-world speak-hello-world — a skill for Claude Code, Codex, Cursor, and other platforms that sets up a language tutoring session via the Speak API with pronunciation scoring and real-time feedback. CX Codex +1 1installs speak-reference-architecture speak-reference-architecture sets up a production architecture for Speak language learning apps, spanning the client, API gateway, and progress store. Useful when building a backend that integrates GPT-4o and Whisper. CX Codex +1 1installs speak-data-handling This skill sets up Speak data handling for student audio, assessment records, and learning progress with GDPR/COPPA considerations. CX Codex +1 1installs image-optimization-helper image-optimization-helper — an auto-activating skill for image optimization tasks in frontend projects. It kicks in on phrases like "image helper" or "image". CX Codex +1 1installs open-graph-creator open-graph-creator generates Open Graph markup and configurations for frontend projects. Activates when setting up page metadata and validating tag parameters. CX Codex +1 1installs

Project sponsors

Companies that keep this analytics open