PhoneWhisper
Phone Host: 24/7 Active • 100% Publicly Reachable Worldwide

Worldwide Mobile AI Speech-to-Text

Zero cloud GPU costs. Running 100% in-memory on a phone MediaTek ARM CPU.

Speech Studio Edge Storage Zstd Studio Console API Cheatsheet

On-Device Speech-to-Text Studio

Record audio in your browser or upload WAV/MP3 files to transcribe in real time directly on the phone ARM CPU.

00:00
audio.wav
Click mic button to record, or upload audio
Live Transcription Output
Click microphone on the capsule to speak, or upload an audio file, then click the blue [↑] button to transcribe...
0 characters Server Ready

On-Device SLM Chat (Qwen 2.5 0.5B)

Runs quantized Qwen 2.5 0.5B Instruct locally in phone RAM via llama.cpp. Streams tokens on 4 ARM CPU threads (~10–20 tok/sec, ~8–12s total compute).

Hyper-Temporary In-Memory Context: Active
Hello! I am Qwen 2.5 running directly inside Termux on your phone. Ask me anything, generate code, or test my reasoning!
Suggestions:

Piper VITS Neural Text-to-Speech (TTS)

Generate lifelike speech in pure English (Amy - Female & Lessac - Male) directly on the sovereign phone node with sub-15ms cached latency.

Worldwide Mobile AI Vector Embeddings

Generate 896-dimensional text embeddings and compute on-device Cosine Similarity scores in real-time.

Semantic Similarity Match: -- %
Vector Space: 896 Dimensions (Mean-Pooled Floating Point)

Worldwide Mobile AI Semantic Reranker (BGE-Reranker-Base)

Resolves role inversions, negations, and subtle semantic contradictions by evaluating joint cross-attention across candidate sentences.

Click "Execute Deep Cross-Attention Reranking" above to test real-time semantic discrimination and contradiction detection.

Computer Vision Suite (Google MediaPipe on ARM)

On-device facial analysis, 33-point pose estimation, 21-point hand tracking, and 468-point 3D face mesh running in ~5–50ms on phone CPU.

Using default benchmark canvas
Live Spatial Topology Overlay
Topology Matrix & Telemetry Ready
{
  "status": "Ready",
  "hint": "Select any MediaPipe task above and click 'Run Vision Task' to execute on phone hardware."
}

Phone AI Datacenter Cloud Storage & CDN

Hyper-speed object & blob storage powered directly by the phone's internal flash storage. Sub-microsecond reflection via in-memory L1 index, zero-tassel multi-tenant isolation, and instant worldwide public CDN links.

Phone Free Flash Storage
--
Physical eMMC/UFS Flash
Tenant Quota Used
0.00 MB / 2 GB
CRUD Speed Benchmark
--
L1 Pure RAM Index Reflection
Multi-Tenancy Isolation
Zero-Tassel
Sandboxed SHA-256 Vault
Cloud Storage Pure Account System (Register or Log In to generate API keys & manage your bucket)
Pure Account System active. Register an account to receive your isolated API key and cloud bucket on the phone.
Drag & Drop Files Here or Select File
Instant streaming upload to phone NVMe/eMMC flash storage with public CDN permalink
Bucket Objects 0 items
Key / Name Size Type Public CDN Permalink Actions
Authenticate with an API key above to view and manage your tenant bucket.
Developer API Integration

        

Zstandard Real-Time Hardware Compression Studio

Hardware-accelerated lossless compression running natively on phone ARM Cortex-A53 silicon. Dual-Tier Architecture: Level 1 (-1 -T4) for real-time HTTP transfer & API requests (<2ms); Level 3 (-3 -T4) for Storage Vault persistence, disk backups, and high-ratio compression (<10ms, 3.2x ratio).

Level 1: Developer API Tier -1 -T4 Active

For live HTTP streaming, client requests, and token pipelines. ~180 MB/s throughput, <2ms latency, ~10 MB RAM footprint.

Level 3: Storage Vault & Backups -3 -T4 Active

For saving files to flash disk, storage vault persistence, & backups (the absolute sweet spot). ~3.2x ratio, ~150 MB/s throughput.

Load Sample:
0 bytes

Universal API Endpoints Cheatsheet

Every AI modality is 100% publicly available worldwide with zero API keys, no sign-ups, sub-50ms latency, and full CORS headers.

PERMANENT PUBLIC API BASE https://phone-whisper-server.pages.dev
LOCAL WI-FI LAN URL http://192.168.29.2:8080
POST / GET /v1/images/compress & /v1/images/info
ARM Cortex-A53 Native Zstandard v1.5.7 L1 <1.5ms Inference 100% Bit-Exact Lossless
Universal Zstandard File & Image Compression

Universal Zstandard (zstd v1.5.7) hardware compression running directly on physical phone ARM Cortex-A53 silicon. Zstd is the exclusive compression engine for both file and text compression all the time, always, everywhere. Compresses file and image binary payloads using Level 1 (-1 -T4) in sub-millisecond execution. Zero external conversion bloat, zero transcoding degradation, and 100% bit-exact lossless recovery.

Image Compression Endpoints

MethodEndpointCompression TierDescription
POST/v1/images/compressZstandard Level 1 (-1 -T4)Compresses binary stream or Base64 image payload losslessly (<1.5ms).
GET/v1/images/infoPublic TelemetryReturns Zstandard v1.5.7 engine specs, dual-tier allocation, and image compression policy.

1-Click Drop-In Snippets

# 1. Direct binary image compression via Zstandard Level 1 (-1 -T4):
curl -X POST "https://phone-whisper-server.pages.dev/v1/images/compress" \
  -H "Content-Type: application/octet-stream" \
  --data-binary "@photo.png" \
  -o "photo.png.zst"

# 2. JSON Base64 image compression:
curl -X POST "https://phone-whisper-server.pages.dev/v1/images/compress" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"image": "iVBORw0KGgoAAAANSUhEUgAA...", "as_json": true}'
# Local standalone module (swades.py in project root):
from swades import Swades

client = Swades()

# 1-line Zstandard image compression (returns compressed .zst bytes):
compressed_bytes = client.compress_image("photo.png")
with open("photo.png.zst", "wb") as f:
    f.write(compressed_bytes)

# Lossless decompression (bit-exact recovery):
restored_bytes = client.decompress_image(compressed_bytes)
import { Swades } from './swades.js';

const client = Swades.init();

// Compress image binary losslessly via Level 1 (-1 -T4):
const zstdBytes = await client.images.compress(imageUint8Array);

// Restore original image bytes:
const originalBytes = await client.images.decompress(zstdBytes);
console.log(`Restored ${originalBytes.length} bytes losslessly`);
POST /v1/compress & /v1/decompress
ARM Cortex-A53 Native Zstd v1.5.7 Dual-Tier ~180 MB/s Throughput Silicon Thermal Guard
Newbie 101: What is this?

Hardware-accelerated Zstandard compression running directly on phone CPU silicon. Dual-tier public architecture: Level 1 (-1 -T4) for sub-millisecond developer API responses and real-time HTTP streaming (<2ms); Level 3 (-3 -T4) publicly available for storage vault backups, disk persistence, and high-ratio file saving (~3.2x ratio). High levels 9-19 are permanently locked out to eliminate phone CPU thermal throttling.

Zstandard Endpoints

MethodEndpointTier / LevelDescription
POST/v1/compressLevel 1 (-1 -T4)Compresses binary stream or JSON payload (<2ms, ~180 MB/s).
POST/v1/decompressAuto-Frame DetectDecompresses Zstd frames with exact buffer allocation (<1ms).
GET/v1/zstd/infoPublic InfoReturns hardware specs, active libzstd v1.5.7 version, and tier policies.

1-Click Drop-In Snippets

# Level 1 Real-time compression (<2ms):
curl -X POST "https://phone-whisper-server.pages.dev/v1/compress" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"data": "High speed sensor telemetry payload", "level": 1}'

# Decompress frame:
curl -X POST "https://phone-whisper-server.pages.dev/v1/decompress" \
  -H "Content-Type: application/json" \
  -d '{"data": "KLUv/SCpLQQAcskdHXA1..."}'
# Local standalone module (swades.py in project root):
from swades import Swades

client = Swades()
# 1-line Level 1 compression:
res = client.compress("High speed sensor telemetry payload", level=1, as_json=True)
print(f"Compressed {res['original_size']}B -> {res['compressed_size']}B in {res['elapsed_ms']}ms")

# 1-line decompress:
original = client.decompress(res['compressed_base64'], as_text=True)
print("Recovered:", original)
// 1-line client compression via swades.js
const res = await Swades.init().compress("High speed sensor telemetry payload");
console.log(`Saved ${res.space_saved_percent}% in ${res.elapsed_ms}ms`);

// 1-line client decompression:
const text = await Swades.init().decompress(res.compressed_base64);
console.log("Recovered text:", text);
PUT / GET / DEL /v1/storage/objects/* & /s/*
Phone Flash Storage Pure RAM L1 Reflection Zero-Tassel Multi-Tenancy Direct Public CDN Stream
Newbie 101: What is this?

This endpoint turns the phone into an S3-compatible, hyper-fast object storage datacenter! Upload images, models, binaries, and documents with sub-microsecond in-memory metadata reflection and instant worldwide CDN permalinks at /s/<tenant_id>/<file>. Multi-tenancy is completely isolated with zero data cross-contamination.

Key Endpoints

MethodEndpointAuth RequiredDescription
PUT/v1/storage/objects/<key>x-api-keyStream upload object to phone storage. Returns ETag & CDN URL.
GET/v1/storage/objects/<key>x-api-keyDownload object from authenticated tenant bucket.
HEAD/v1/storage/objects/<key>x-api-keyCheck file existence & metadata in pure RAM.
DELETE/v1/storage/objects/<key>x-api-keyInstantly evict object from RAM index and delete from flash.
GET/v1/storage/objectsx-api-keyList all objects and CDN URLs in tenant's bucket.
GET/s/<tenant_id>/<key>Public (Zero Auth)Worldwide public CDN stream with caching & ETag headers.
POST/v1/storage/auth/keysNone (Open Provision)Create an isolated tenant API key stored in phone auth vault.

1-Click Drop-In Snippets

# Upload object to phone cloud storage:
curl -X PUT "https://phone-whisper-server.pages.dev/v1/storage/objects/photos/banner.png" \
  -H "x-api-key: sk_swades_YOUR_KEY" \
  -H "Content-Type: image/png" \
  --data-binary "@./banner.png"

# Stream via Worldwide Public CDN (No auth!):
curl -O "https://phone-whisper-server.pages.dev/s/YOUR_TENANT/photos/banner.png"
POST /v1/chat/completions
OpenAI-Compatible Real-Time SSE Stream Qwen 2.5 0.5B
Newbie 101: What is this?

This endpoint allows you to chat with the on-device AI just like ChatGPT! Send a list of messages, and the phone streams back tokens word-by-word at ~20 tokens/sec. Drop-in replacement for OpenAI SDK.

Parameters

FieldTypeRequiredDefaultDescription
messagesArray of ObjectsYes-Conversation history: [{"role":"user","content":"Hi"}]
streamBooleanNofalseSet to true for token-by-token Server-Sent Events (SSE) streaming
temperatureFloatNo0.7Creativity (0.0 = deterministic/coding, 1.0 = creative)
max_tokensIntegerNo256Maximum number of words/tokens to generate

1-Click Drop-In Snippets

curl -N -X POST "https://phone-whisper-server.pages.dev/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -d '{"messages": [{"role": "user", "content": "Explain relativity in 10 words"}], "stream": true}'
POST /inference
Speech-to-Text OpenAI Whisper Base.en Form-Data Audio
Newbie 101: What is this?

Send any recorded voice file (WAV, MP3, OGG, M4A) and the phone transcribes it into crystal-clear text or subtitle formats (SRT / VTT).

Parameters (Multipart Form-Data)

FieldTypeRequiredDefaultDescription
fileBinary AudioYes-Audio recording file stream (16kHz WAV, MP3, M4A, OGG)
response_formatStringNojsonOptions: json, text, srt, vtt, verbose_json
temperatureFloatNo0.0Greedy search sampling (0.0 for highest accuracy)

1-Click Drop-In Snippets

curl -X POST "https://phone-whisper-server.pages.dev/inference" \
  -F "file=@recording.wav" \
  -F "temperature=0.0"
POST /v1/audio/speech
Piper Neural Voice WAV Audio Stream Fast ARM VITS Synthesis
Newbie 101: What is this?

Send plain text and receive back real human voice audio (WAV) directly generated on the phone CPU. Great for giving your bots a voice!

Parameters (JSON Body)

FieldTypeRequiredDefaultDescription
inputStringYes-Text to synthesize into spoken audio
voiceStringNoaf_heartPure English Voice: af_heart (Female • Heart), am_adam (Male • Adam)
speedFloatNo1.0Speech rate multiplier (0.5 to 2.0)

1-Click Drop-In Snippets

curl -X POST "https://phone-whisper-server.pages.dev/v1/audio/speech" \
  -H "Content-Type: application/json" \
  -d '{"input": "Hello world from Piper VITS neural speech", "voice": "amy"}' \
  --output speech.wav
POST /v1/embeddings
Dense Vectors 896 Dimensions BAAI BGE-Small
Newbie 101: What is this?

Converts any sentence into a numerical array (896 floats). Compare two sentence vectors using cosine similarity to search documents by meaning rather than exact keyword matches!

curl -X POST "https://phone-whisper-server.pages.dev/v1/embeddings" \
  -H "Content-Type: application/json" \
  -d '{"input": "Semantic vector search with mobile AI"}'
POST /v1/rerank
NLI Cross-Attention BGE Reranker-Base Document Scoring
Newbie 101: What is this?

Takes a question and candidate search results, compares them cross-attentively, and scores them from 0.0 to 1.0. Eliminates hallucinated search results and catches contradictions!

curl -X POST "https://phone-whisper-server.pages.dev/v1/rerank" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "The company approved the investment proposal.",
    "documents": [
      "The board voted in favor of funding the venture.",
      "The company rejected the investment proposal."
    ]
  }'
POST /v1/vision/{task}
Static Image Video Keyframe Sequence Live WebCam Stream Sub-10ms ARM
Newbie 101: What is this?

On-device Computer Vision suite supporting Static Images, Video Files, and Real-Time Live WebCam Streams. Tracks 33-point body skeletons, 21-point hand landmarks, 468-point 3D face meshes, and portrait bokeh background blur in under 10ms!

Replace {task} in the URL with any of: face-detection, hand-landmarks, pose-landmarks, face-mesh, selfie-segmentation, background-blur, object-detection, holistic.

3 Input Modality Examples

curl -X POST "https://phone-whisper-server.pages.dev/v1/vision/face-detection" \
  -H "Content-Type: application/json" \
  -d '{"task": "face_detection", "image_base64": "data:image/jpeg;base64,..."}'
GET /telemetry
Real Hardware State Linux Kernel /proc Zero-Hardcoding
Newbie 101: What is this?

Returns 100% genuine real-time hardware telemetry directly from the Android Linux kernel: exact battery percentage, temperature, voltage, free RAM, CPU load, and active processes.

curl -s "https://phone-whisper-server.pages.dev/telemetry"

Pre-Built 100% On-Device Recipes for Newbies

Combine multiple models into complete end-to-end applications in under 20 lines of code:

Full Voice AI Assistant

Capture audio $ o$ Transcribe with Whisper $ o$ Reason with Qwen SLM $ o$ Speak reply with Neural TTS.

# Python Voice Pipeline
txt = transcribe("user.wav")["text"]
reply = "".join(list(chat(txt, stream=True)))
text_to_speech(reply, "reply.wav")
Smart Semantic Document RAG

Vector Embeddings $ o$ Cosine Similarity Search $ o$ Cross-Attention Reranking $ o$ Accurate Grounded Answers.

# RAG Pipeline
q_vec = embed_text("What is quantum computing?")
ranked = rerank(query, candidate_docs)
ans = chat(f"Context: {ranked[0]}\nQuestion: {query}")
Real-Time Gesture Controller

Stream webcam frames $ o$ Detect 21 hand joints $ o$ Trigger custom UI gestures or drone controls in $<8 ext{ms}$.

# Hand Tracking
const res = await detectVision(frameB64, "hand_landmarks", true);
if (res.hands && res.hands[0]) {
  const indexTip = res.hands[0].landmarks[8];
  moveVirtualCursor(indexTip.x, indexTip.y);
}

Live Phone Hardware Telemetry (Redmi 9i / MediaTek)

100% genuine data streamed directly from the Android Linux kernel (/proc/meminfo, dumpsys battery, /proc/stat).

CPU Load & Core Activity 8x ARMv8 Cores
-- % CPU
Edge Latency & Network RTT QUIC / Anycast
-- ms RTT
Memory Supervisor (Process Auto-Killer) 75s Inactivity Timeout
0 Active • 4 Sleeping
All models evicted from RAM (2.0+ GB Free)
Real RAM Allocation Kernel MemInfo
1.75 / 3.79 GB
Real Battery & Thermal Live HW
34.0 °C
Inference Velocity Tiny.en
-- tok/sec
Active Daemon & Process Matrix Termux Daemon
Process Name PID CPU % Memory Threads Status
Live System Event Feed Live Stream

How It Works

From your microphone to on-device neural processing and back in ~1 second.

1
Client Input & Audio/JSON Capture
Browser or API client captures microphone WAV, text prompt, or camera frames.
2
Sovereign On-Device HTTP & TLS Gateway
Requests are processed directly by the on-device Python gateway inside Termux on the phone.
3
Python Multi-Modal Gateway (gateway.py)
Lightweight supervisor spawns requested model (llama.cpp/whisper.cpp/MediaPipe) and kills idle ones after 75s to fit in 2GB RAM.
4
ARM CPU Neural Compute (MediaTek Helio G25)
Phone's 8 Cortex-A53 CPU cores crunch quantized model weights in RAM, streaming back tokens and spatial telemetry.

Developer Guide & Drop-In Client Integration

Drop-in code snippets across Python, JavaScript, TypeScript, Flutter/Dart, Rust, Go, and Shell pipelines. Connect your apps to this phone AI datacenter in under 60 seconds.

60-Second Quickstart Test

Run a live health and multi-modal roundtrip test to the phone right from your browser or terminal.

Python (Sync, Async & Colab)
JavaScript / TypeScript / React
cURL & Automated Bash
Flutter / Dart Mobile
Rust & Go
Phone Termux Host Setup
Universal Python SDK: Works out-of-the-box in Google Colab, Jupyter, FastAPI, Django, Flask, or backend microservices. Zero API keys required.
import requests, json, base64

BASE_URL = "https://phone-whisper-server.pages.dev"

# ==========================================
# 1. Qwen 2.5 SLM Streaming Chat
# ==========================================
def stream_chat(prompt: str, system_prompt: str = "You are a helpful AI assistant."):
    url = f"{BASE_URL}/v1/chat/completions"
    payload = {
        "messages": [
            {"role": "system", "content": system_prompt},
            {"role": "user", "content": prompt}
        ],
        "temperature": 0.7,
        "max_tokens": 300,
        "stream": True
    }
    res = requests.post(url, json=payload, headers={"Accept": "text/event-stream"}, stream=True)
    for line in res.iter_lines(decode_unicode=True):
        if line and line.startswith("data: ") and "[DONE]" not in line:
            chunk = json.loads(line[6:])
            token = chunk["choices"][0]["delta"].get("content", "")
            yield token

# ==========================================
# 2. OpenAI Whisper Speech-to-Text (STT)
# ==========================================
def transcribe_audio(audio_file_path: str):
    url = f"{BASE_URL}/inference"
    with open(audio_file_path, "rb") as f:
        res = requests.post(url, files={"file": f}, data={"response_format": "json", "temperature": "0.0"})
    return res.json()  # Returns {'text': '...', 'duration': 2.4, ...}

# ==========================================
# 3. Piper VITS Neural Text-to-Speech (TTS)
# ==========================================
def text_to_speech(text: str, output_path: str = "voice.wav"):
    url = f"{BASE_URL}/v1/audio/speech"
    res = requests.post(url, json={"input": text, "speed": 1.0})
    with open(output_path, "wb") as f:
        f.write(res.content)
    print(f"[OK] Audio saved to {output_path}")

# ==========================================
# 4. Dense Vector Embeddings (896 Dimensions)
# ==========================================
def get_embeddings(text: str):
    url = f"{BASE_URL}/v1/embeddings"
    res = requests.post(url, json={"input": text})
    return res.json()["data"][0]["embedding"]  # Returns 896 float vector

# ==========================================
# 5. Deep Cross-Attention Semantic Reranker
# ==========================================
def rerank_documents(query: str, documents: list):
    url = f"{BASE_URL}/v1/rerank"
    res = requests.post(url, json={"query": query, "documents": documents})
    return res.json()  # Returns ranked results with cross-attention scores

# ==========================================
# 6. Google MediaPipe Vision (Image / Video / Live Frame)
# ==========================================
def detect_vision(image_path: str, task: str = "face_detection"):
    url = f"{BASE_URL}/v1/vision/{task.replace('_', '-')}"
    with open(image_path, "rb") as f:
        b64 = base64.b64encode(f.read()).decode()
    res = requests.post(url, json={"task": task, "image_base64": b64})
    return res.json()  # Returns 3D spatial landmarks / bounding boxes

# ==========================================
# 7. Real-Time Hardware & Battery Telemetry
# ==========================================
def get_telemetry():
    return requests.get(f"{BASE_URL}/telemetry").json()

# --- Quick Test ---
if __name__ == "__main__":
    print("[Chat] Qwen SLM Stream Output:")
    for token in stream_chat("Give me 3 bullet points on why on-device AI is the future."):
        print(token, end="", flush=True)
    print("\n\n[Battery] Phone Battery:", get_telemetry()["battery"])
Zero-Dependency Web & Node.js: Compatible with browser native Fetch, Node.js v18+, Next.js App Router, Vue, React Native, and Electron.
const BASE_URL = "https://phone-whisper-server.pages.dev";

// 1. Token-by-Token Streaming Chat (Qwen 2.5 SLM)
export async function streamChat(prompt, onToken, systemPrompt = "You are a helpful AI.") {
  const res = await fetch(`${BASE_URL}/v1/chat/completions`, {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      messages: [
        { role: "system", content: systemPrompt },
        { role: "user", content: prompt }
      ],
      stream: true
    })
  });

  const reader = res.body.getReader();
  const decoder = new TextDecoder();
  while (true) {
    const { done, value } = await reader.read();
    if (done) break;
    const chunk = decoder.decode(value);
    for (const line of chunk.split("\n")) {
      if (line.startsWith("data: ") && !line.includes("[DONE]")) {
        const delta = JSON.parse(line.slice(6))?.choices?.[0]?.delta?.content;
        if (delta) onToken(delta);
      }
    }
  }
}

// 2. Audio Transcription (Whisper STT)
export async function transcribeAudio(audioBlob) {
  const formData = new FormData();
  formData.append("file", audioBlob, "audio.wav");
  const res = await fetch(`${BASE_URL}/inference`, { method: "POST", body: formData });
  return await res.json();
}

// 3. Text-to-Speech (Piper VITS TTS)
export async function playTextToSpeech(text) {
  const res = await fetch(`${BASE_URL}/v1/audio/speech`, {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({ input: text })
  });
  const audioBlob = await res.blob();
  const audioUrl = URL.createObjectURL(audioBlob);
  const audio = new Audio(audioUrl);
  audio.play();
}

// 4. Dense Vector Embeddings
export async function getEmbedding(text) {
  const res = await fetch(`${BASE_URL}/v1/embeddings`, {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({ input: text })
  });
  const json = await res.json();
  return json.data[0].embedding; // 896-dimension array
}

// 5. Deep Cross-Attention Reranker
export async function rerankDocs(query, documents) {
  const res = await fetch(`${BASE_URL}/v1/rerank`, {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({ query, documents })
  });
  return await res.json();
}

// 6. MediaPipe Vision (Image / Video Sequence / Live WebCam Frame)
export async function detectVision(imageBlobOrBase64, task = "face_detection", isLiveStream = false) {
  let b64 = imageBlobOrBase64;
  if (imageBlobOrBase64 instanceof Blob) {
    b64 = await new Promise(r => {
      const reader = new FileReader();
      reader.onload = () => r(reader.result);
      reader.readAsDataURL(imageBlobOrBase64);
    });
  }
  const res = await fetch(`${BASE_URL}/v1/vision/${task.replace(/_/g, "-")}`, {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({ task, image_base64: b64, is_live_stream: isLiveStream })
  });
  return await res.json();
}

// 7. Live Kernel Telemetry
export async function getTelemetry() {
  return await fetch(`${BASE_URL}/telemetry`).then(r => r.json());
}
Terminal & CI/CD Pipelines: Ready-to-run shell one-liners for GitHub Actions, cron jobs, and bash scripts.
# 1. Chat Completion (SSE Real-Time Stream)
curl -N -X POST "https://phone-whisper-server.pages.dev/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -d '{"messages": [{"role": "user", "content": "Explain relativity in 10 words"}], "stream": true}'

# 2. Audio Transcription (Whisper Base.en)
curl -X POST "https://phone-whisper-server.pages.dev/inference" \
  -F "file=@audio.wav" \
  -F "temperature=0.0"

# 3. Text-to-Speech (Neural Voice Synthesis)
curl -X POST "https://phone-whisper-server.pages.dev/v1/audio/speech" \
  -H "Content-Type: application/json" \
  -d '{"input": "Hello from autonomous phone AI datacenter"}' \
  --output speech.wav

# 4. Dense Vector Embeddings (896 Dimensions)
curl -X POST "https://phone-whisper-server.pages.dev/v1/embeddings" \
  -H "Content-Type: application/json" \
  -d '{"input": "Semantic vector search on mobile AI"}'

# 5. Deep Cross-Attention Semantic Reranker
curl -X POST "https://phone-whisper-server.pages.dev/v1/rerank" \
  -H "Content-Type: application/json" \
  -d '{"query": "The company approved funding.", "documents": ["The venture received investment.", "The engine is made of steel."]}'

# 6. MediaPipe Vision: Face & Landmark Detection
curl -X POST "https://phone-whisper-server.pages.dev/v1/vision/face-detection" \
  -H "Content-Type: application/json" \
  -d '{"task": "face_detection", "image_base64": "data:image/jpeg;base64,..."}'

# 7. Real Battery & Kernel Telemetry (Real-Time Metrics)
curl -s "https://phone-whisper-server.pages.dev/telemetry" | jq .battery
Turn Any Spare Android Phone into a 24/7 AI Datacenter:
# 1. Update and install packages in Termux
pkg update && pkg install -y git clang cmake tmux espeak python nodejs

# 2. Clone repo & build whisper.cpp + llama.cpp with ARM NEON optimizations
git clone --recursive https://github.com/Electroiscoding/phone-whisper-server
cd phone-whisper-server

# 3. Launch 24/7 self-healing supervisor (survives app kills, tunnel rotations & reboots)
python3 mobile/nuclear_watchdog.py