AI
Pass

Build an AI Audio Transcriber with AI Pass SDK

Build an AI Audio Transcriber with AI Pass SDK

This quick guide walks you through building a simple audio transcription tool using the AI Pass SDK. Users upload audio, you return clean text — and you earn commission on every transcription.

What You'll Build

A straightforward audio transcriber where people upload audio files and receive accurate text transcriptions. Authentication and billing are handled by AI Pass, and you earn 50% commission on every API call.

Step 1: Create Your AI Pass Account

Sign up at aipass.one and confirm your email.

Step 2: Create an OAuth2 Client

  1. Go to Developer Dashboard
  2. Open OAuth2 Clients
  3. Click Create Client
  4. Copy your Client ID (it looks like client_ODyf..., not your app slug)

Step 3: Set Up the SDK

Add the SDK to your page and initialize it:

<script src="https://aipass.one/aipass-sdk.js"></script>
<script>
  AiPass.initialize({
    clientId: 'YOUR_CLIENT_ID',
    requireLogin: true
  });
</script>

Step 4: Build the Transcriber

Hook up a file input and call the SDK to transcribe:

async function transcribe() {
  const fileInput = document.getElementById('audioFile');
  const audioFile = fileInput.files[0];
  if (!audioFile) return alert('Please select an audio file');
  
  document.getElementById('result').innerText = 'Transcribing...';
  
  const r = await AiPass.transcribeAudio({
    model: 'whisper-1',
    file: audioFile
  });
  
  document.getElementById('result').innerText = r.text;
}

Step 5: Embed Anywhere

Option A: Self-host — put this on your server, GitHub Pages, Netlify, Vercel, etc.

Option B: Embed — use the </> button (bottom-right) to grab iframe embed code and drop it into any page.

How You Earn

Every transcription triggers an API call. You receive a 50% commission on each call.

Full Working Example

<!DOCTYPE html>
<html>
<head>
  <title>AI Audio Transcriber</title>
  <script src="https://aipass.one/aipass-sdk.js"></script>
</head>
<body>
  <h1>AI Audio Transcriber</h1>
  <p>Upload an audio file (MP3, WAV, M4A, OGG, FLAC) to get a text transcription.</p>
  <input type="file" id="audioFile" accept=".mp3,.wav,.m4a,.ogg,.flac,.webm,.mpeg,.mpga" />
  <button onclick="transcribe()">Transcribe Audio</button>
  <div id="loading" style="display:none;">Transcribing your audio...</div>
  <div id="result" style="white-space:pre-wrap;margin-top:20px;padding:10px;border:1px solid #ccc;min-height:50px;"></div>
  <button id="copyBtn" style="display:none;" onclick="copyText()">Copy Text</button>

  <script>
    AiPass.initialize({ clientId: 'YOUR_CLIENT_ID', requireLogin: true });
    
    async function transcribe() {
      const fileInput = document.getElementById('audioFile');
      const audioFile = fileInput.files[0];
      if (!audioFile) return alert('Please select an audio file');
      
      document.getElementById('loading').style.display = 'block';
      document.getElementById('result').innerText = '';
      document.getElementById('copyBtn').style.display = 'none';
      
      try {
        const r = await AiPass.transcribeAudio({
          model: 'whisper-1',
          file: audioFile
        });
        document.getElementById('result').innerText = r.text;
        document.getElementById('copyBtn').style.display = 'inline';
      } catch(e) {
        document.getElementById('result').innerText = 'Error: ' + e.message;
      }
      document.getElementById('loading').style.display = 'none';
    }
    
    function copyText() {
      navigator.clipboard.writeText(document.getElementById('result').innerText);
      document.getElementById('copyBtn').innerText = 'Copied!';
      setTimeout(() => document.getElementById('copyBtn').innerText = 'Copy Text', 2000);
    }
  </script>
</body>
</html>

Next Steps

Build with the AI Pass SDK. Users pay, you earn.