# How Many Voice Tools Are Available in God's Eye View?

> Explore the three voice tools in God's Eye View: voiceCost.js for cost, gevRealtime.js for UI, and gevActions.js for session management. Enhance your voice app development today.

- Repository: [Bilawal Sidhu/gods-eye-view](https://github.com/bilawalsidhu/gods-eye-view)
- Tags: how-to-guide
- Published: 2026-09-06

---

**God's Eye View includes three distinct voice-related tools:** [`voiceCost.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/voiceCost.js) for cost estimation, [`gevRealtime.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/gevRealtime.js) for the realtime voice UI, and [`gevActions.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/gevActions.js) for voice session actions.

God's Eye View is an open-source project by **bilawalsidhu/gods-eye-view** that provides realtime voice capabilities powered by OpenAI's voice models. If you're exploring the codebase or planning to extend its voice features, understanding the available voice tools is essential. This article breaks down each of the three voice tools, their source file locations, and how they work together.

## The Three Voice Tools in God's Eye View

The complete voice functionality in God's Eye View is implemented across three JavaScript modules in the `src/voice/` directory. Each tool serves a distinct purpose in the voice pipeline.

### 1. voiceCost.js — Cost Estimation and Spend Guard

**[`voiceCost.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/voiceCost.js)** handles model registry management, cost calculation, and spend-guard logic for OpenAI realtime voice sessions. This tool prevents runaway costs by tracking usage and enforcing thresholds.

Located at [`src/voice/voiceCost.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/src/voice/voiceCost.js), it exports functions to resolve voice models, create cost trackers, and monitor session spending.

```javascript
import {
  resolveVoiceModel,
  createVoiceCostTracker,
} from './voice/voiceCost.js';

// Choose a tier (standard or mini)
const model = resolveVoiceModel('standard');

// Create a cost tracker for a session
const tracker = createVoiceCostTracker({ tier: model.tier });

// After each response, record its usage
tracker.record(response.usage);

// Retrieve the current cost state
const state = tracker.state();
console.log('Current cost:', state.display);

```

The cost tracker maintains running totals and can trigger warnings when predefined spend limits are approached.

### 2. gevRealtime.js — Realtime Voice UI

**[`gevRealtime.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/gevRealtime.js)** implements the client-side realtime voice interface. This tool renders cost readouts, displays spend warnings, and manages microphone interaction for the user-facing voice experience.

Found at [`src/voice/gevRealtime.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/src/voice/gevRealtime.js), it initializes the voice session UI and connects cost updates to visual feedback.

```javascript
import { initRealtimeVoice } from './voice/gevRealtime.js';

// Initialise the realtime voice UI (e.g., on a button click)
document.getElementById('startBtn').addEventListener('click', () => {
  initRealtimeVoice({
    onCostUpdate: (cost) => console.log('Cost update:', cost),
    onWarning: () => console.warn('Spend threshold reached!'),
  });
});

```

The callback-based API allows easy integration with existing UI frameworks or vanilla JavaScript applications.

### 3. gevActions.js — Voice Action Helpers

**[`gevActions.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/gevActions.js)** provides a structured set of voice-related actions that the UI layer invokes. This tool abstracts the underlying voice session operations into predictable, importable functions.

Residing at [`src/voice/gevActions.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/src/voice/gevActions.js), it handles session lifecycle management and transcript communication.

```javascript
import {
  startVoiceSession,
  stopVoiceSession,
  sendTranscript,
} from './voice/gevActions.js';

// Start a session
startVoiceSession({ tier: 'mini' });

// Send a transcript to the server
sendTranscript('Hello world!');

// Stop the session when done
stopVoiceSession();

```

The action pattern cleanly separates business logic from presentation code, making the voice system testable and maintainable.

## How the Voice Tools Work Together

The three voice tools in God's Eye View form a layered architecture:

- **[`gevActions.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/gevActions.js)** provides the command layer — starting, stopping, and sending data
- **[`gevRealtime.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/gevRealtime.js)** provides the presentation layer — rendering UI and handling user input
- **[`voiceCost.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/voiceCost.js)** provides the guard layer — tracking expenses and preventing overspend

When a user initiates a voice session, [`gevRealtime.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/gevRealtime.js) calls `startVoiceSession()` from [`gevActions.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/gevActions.js), which configures the session with a cost tracker from [`voiceCost.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/voiceCost.js). Throughout the session, usage records flow back to the tracker, which updates the UI through `onCostUpdate` callbacks.

## Summary

- **Three voice tools** constitute the complete voice system in God's Eye View
- **[`voiceCost.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/voiceCost.js)** in [`src/voice/voiceCost.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/src/voice/voiceCost.js) manages model selection, cost tracking, and spend guards
- **[`gevRealtime.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/gevRealtime.js)** in [`src/voice/gevRealtime.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/src/voice/gevRealtime.js) renders the realtime voice UI with cost feedback
- **[`gevActions.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/gevActions.js)** in [`src/voice/gevActions.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/src/voice/gevActions.js) exposes session control and transcript actions
- All voice tools are importable as ES modules with clear, callback-based APIs

## Frequently Asked Questions

### Can I use the voice tools independently of each other?

Yes, according to the **bilawalsidhu/gods-eye-view** source code, each voice tool is designed as a standalone module. You can import [`voiceCost.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/voiceCost.js) for cost tracking without the UI, or use [`gevActions.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/gevActions.js) with a custom interface instead of [`gevRealtime.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/gevRealtime.js). However, they work best together as an integrated system.

### What voice models does God's Eye View support?

Based on the [`voiceCost.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/voiceCost.js) implementation, God's Eye View supports at least two tiers: **`standard`** and **`mini`**. The `resolveVoiceModel()` function handles model registry lookup, which can be extended for additional OpenAI voice models as they become available.

### How does the spend guard prevent unexpected costs?

The spend guard in [`voiceCost.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/voiceCost.js) creates a cost tracker that accumulates usage from each API response. When configured thresholds are reached, it triggers warnings through callbacks like `onWarning`. This allows applications to programmatically stop sessions or alert users before costs escalate.

### Are there additional voice features planned for God's Eye View?

The current repository contains exactly three voice tools with no additional voice modules in the codebase. Future extensions would follow the established pattern in `src/voice/`, likely adding new action types, cost models, or UI components to the existing architecture.