File size: 5,246 Bytes
b8a0ebd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<!DOCTYPE html>
<html lang="en" class="dark">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>API Documentation - AudioSlicer Pro</title>
    <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://unpkg.com/feather-icons"></script>
    <script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.net.min.js"></script>
</head>
<body class="bg-gray-900 text-gray-100 min-h-screen">
    <div id="vanta-bg" class="vanta-container"></div>
    
    <div class="container mx-auto px-4 py-12 max-w-5xl">
        <header class="mb-12">
            <h1 class="text-3xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-primary to-secondary mb-2">
                AudioSlicer Pro API
            </h1>
            <p class="text-gray-400">REST API documentation for integrating with our audio processing services</p>
        </header>

        <div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
            <div class="lg:col-span-1">
                <div class="bg-gray-800 rounded-xl p-6 shadow-xl border border-gray-700 sticky top-8">
                    <h2 class="text-xl font-semibold mb-4">Endpoints</h2>
                    <ul class="space-y-2">
                        <li><a href="#transcription" class="text-primary hover:text-primary/80">Transcription</a></li>
                        <li><a href="#segmentation" class="text-primary hover:text-primary/80">Segmentation</a></li>
                        <li><a href="#analysis" class="text-primary hover:text-primary/80">Analysis</a></li>
                    </ul>
                    <div class="mt-8">
                        <h2 class="text-xl font-semibold mb-4">Authentication</h2>
                        <div class="bg-gray-700 p-4 rounded-lg">
                            <code class="text-xs">X-API-KEY: your_api_key</code>
                        </div>
                    </div>
                </div>
            </div>

            <div class="lg:col-span-2 space-y-12">
                <section id="transcription" class="bg-gray-800 rounded-xl p-6 shadow-xl border border-gray-700">
                    <div class="flex items-center mb-4">
                        <span class="bg-primary text-white px-3 py-1 rounded-full text-xs font-medium mr-3">POST</span>
                        <h2 class="text-xl font-semibold">/api/transcribe</h2>
                    </div>
                    
                    <p class="text-gray-400 mb-6">Transcribe audio files using Whisper v3 or DeepSeek Speech models.</p>
                    
                    <h3 class="font-medium mb-2">Parameters</h3>
                    <div class="bg-gray-700 rounded-lg p-4 mb-6 overflow-x-auto">
                        <pre class="text-sm"><code>{
  "audio": "base64_encoded_audio",
  "model": "whisper|deepseek|auto",
  "language": "auto|en|es|fr|de|...",
  "timestamps": true,
  "speakers": false
}</code></pre>
                    </div>

                    <h3 class="font-medium mb-2">Example Response</h3>
                    <div class="bg-gray-700 rounded-lg p-4 overflow-x-auto">
                        <pre class="text-sm"><code>{
  "success": true,
  "processing_time": 4.32,
  "segments": [
    {
      "start": 0.0,
      "end": 5.24,
      "text": "Hello world...",
      "speaker": "Speaker 1"
    }
  ]
}</code></pre>
                    </div>
                </section>

                <section id="segmentation" class="bg-gray-800 rounded-xl p-6 shadow-xl border border-gray-700">
                    <div class="flex items-center mb-4">
                        <span class="bg-green-500 text-white px-3 py-1 rounded-full text-xs font-medium mr-3">POST</span>
                        <h2 class="text-xl font-semibold">/api/segment</h2>
                    </div>
                    <p class="text-gray-400 mb-6">Split audio files into logical segments based on silence detection.</p>
                    <!-- Additional content would go here -->
                </section>

                <section id="analysis" class="bg-gray-800 rounded-xl p-6 shadow-xl border border-gray-700">
                    <div class="flex items-center mb-4">
                        <span class="bg-blue-500 text-white px-3 py-1 rounded-full text-xs font-medium mr-3">GET</span>
                        <h2 class="text-xl font-semibold">/api/analyze</h2>
                    </div>
                    <p class="text-gray-400 mb-6">Analyze audio characteristics and metadata.</p>
                    <!-- Additional content would go here -->
                </section>
            </div>
        </div>
    </div>

    <script>
        VANTA.NET({
            el: "#vanta-bg",
            mouseControls: true,
            touchControls: true,
            gyroControls: false,
            minHeight: 200.00,
            minWidth: 200.00,
            scale: 1.00,
            scaleMobile: 1.00,
            color: '#3b82f6',
            backgroundColor: '#0f172a',
            points: 10.00,
            maxDistance: 22.00,
            spacing: 18.00
        })
        feather.replace()
    </script>
</body>
</html>