n8n-nodes-soniox-api 0.5.4 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Konstantin
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Konstantin
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,226 +1,227 @@
1
- # n8n-nodes-soniox-api
2
-
3
- WIP VERSION! NOT FOR PRODUCTION USE!
4
- Has not working yet!
5
-
6
- [![npm version](https://img.shields.io/npm/v/n8n-nodes-soniox-api.svg)](https://www.npmjs.com/package/n8n-nodes-soniox-api)
7
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
8
- [![n8n Community Node](https://img.shields.io/badge/n8n-Community%20Node-blue)](https://docs.n8n.io/integrations/community-nodes/)
9
-
10
- This is an n8n community node that integrates [Soniox Speech-to-Text API](https://soniox.com/) — a high-accuracy, multilingual speech recognition system.
11
-
12
- **Features:**
13
- - 🎯 One-node transcription (like Whisper node)
14
- - 🌍 60+ languages supported
15
- - 🎭 Speaker diarization
16
- - 🔄 Real-time translations
17
- - ⚡ Async processing with auto-polling
18
-
19
- [n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/reference/license/) workflow automation platform.
20
-
21
- [Installation](#installation) ·
22
- [Operations](#operations) ·
23
- [Credentials](#credentials) ·
24
- [Usage](#usage) ·
25
- [Resources](#resources)
26
-
27
- ## Installation
28
-
29
- ### n8n Community Nodes
30
-
31
- 1. Go to **Settings → Community Nodes** in your n8n instance
32
- 2. Click **Install** and enter: `n8n-nodes-soniox-api`
33
- 3. Click **Install**
34
- 4. Restart n8n to load the node
35
-
36
- ### Manual Installation
37
-
38
- To get started locally, install the node in your n8n root directory:
39
-
40
- ```bash
41
- cd ~/.n8n
42
- npm install n8n-nodes-soniox-api
43
- ```
44
-
45
- For Docker-based n8n installations, add the package to your n8n installation:
46
-
47
- ```bash
48
- docker exec -it n8n npm install n8n-nodes-soniox-api
49
- ```
50
-
51
- ### Development
52
-
53
- For local development and testing:
54
-
55
- ```bash
56
- git clone https://github.com/mazixs/n8n-nodes-soniox-api.git
57
- cd n8n-nodes-soniox-api
58
- npm install
59
- npm run build
60
- npm link
61
-
62
- # Link to your n8n installation
63
- cd ~/.n8n
64
- npm link n8n-nodes-soniox-api
65
- ```
66
-
67
- ## Operations
68
-
69
- ### Transcription Operations (Recommended)
70
- - **Transcribe** 🆕 — All-in-one audio transcription (like Whisper node)
71
- - Input: Binary audio data
72
- - Output: Complete transcript with text + tokens + metadata
73
- - Automatically handles: upload create wait → get transcript
74
- - Configurable: model, language, speaker diarization, translations, timeout
75
- - **Get** — Retrieve existing transcription result by ID
76
- - **List** — List all transcriptions (with pagination)
77
-
78
- ### File Operations (Advanced)
79
- - **Upload** — Upload audio files (multipart/form-data support)
80
- - **Get** — Retrieve file by ID
81
- - **Get All** — List all files (with pagination)
82
- - **Delete** — Delete a file
83
-
84
- ### Model Operations
85
- - **Get All** — List available speech recognition models
86
-
87
- ### Deprecated Operations
88
- The following operations still work but will be removed in v0.6.0:
89
- - **Create** → use **Transcribe** instead
90
- - **Create and Wait** → use **Transcribe** instead
91
- - **Get By File** → use **Get** instead
92
-
93
- ## Credentials
94
-
95
- ### Setting up Credentials
96
-
97
- 1. In n8n, navigate to **Credentials → Add Credential → Soniox API**
98
- 2. Enter your credentials:
99
- - **API Key**: Get your API key from [console.soniox.com](https://console.soniox.com/)
100
- - **API URL**: `https://api.soniox.com/v1` (default)
101
- 3. Click **Save**
102
-
103
- ## Usage
104
-
105
- ### Quick Start (Recommended)
106
-
107
- The simplest way to transcribe audio - just **one node**:
108
-
109
- ```
110
- [Read Binary File] → [Soniox: Transcribe] → Done!
111
- ```
112
-
113
- **Node Configuration:**
114
-
115
- **Soniox: Transcribe**
116
- - Resource: `Transcription`
117
- - Operation: `Transcribe`
118
- - Binary Property: `data`
119
- - Model: `Realtime or Async` (or any model from dropdown)
120
- - Additional Fields:
121
- - Language: `en` (optional, auto-detected if not specified)
122
- - Context: Domain-specific terms (optional)
123
- - Translation Languages: `ru,es,fr` (optional)
124
- - Enable Speaker Diarization: `true` (optional)
125
-
126
- **Output:**
127
- ```json
128
- {
129
- "transcript": {
130
- "text": "Full transcribed text here",
131
- "tokens": [
132
- {"text": "Hello", "start_ms": 10, "confidence": 0.95}
133
- ]
134
- },
135
- "status": "completed",
136
- "model": "stt-async-v3",
137
- "audio_duration_ms": 16079
138
- }
139
- ```
140
-
141
- ### Advanced Workflow (Multiple Nodes)
142
-
143
- For more control, use separate nodes:
144
-
145
- ```
146
- [Read Binary File]
147
-
148
- [Soniox: File Upload]
149
-
150
- [Soniox: Create and Wait]
151
-
152
- [Process Result]
153
- ```
154
-
155
- **Note:** The advanced workflow requires 2-3 nodes. We recommend using **Transcribe** for simplicity.
156
-
157
- ## Features
158
-
159
- - ✅ **Retry Logic** — Automatic retry with exponential backoff for failed requests
160
- - ✅ **Rate Limiting** — Smart handling of 429 responses with Retry-After headers
161
- - ✅ **Timeout Control** — Configurable timeouts for API and file upload operations
162
- - ✅ **Type Safety** — Full TypeScript implementation with n8n-workflow types
163
- - ✅ **Error Handling** — Comprehensive error messages for debugging
164
-
165
- ## Resources
166
-
167
- - [n8n community nodes documentation](https://docs.n8n.io/integrations/community-nodes/)
168
- - [Soniox API Documentation](https://soniox.com/docs/stt/api-reference)
169
- - [Soniox Console](https://console.soniox.com/)
170
-
171
- ## Development
172
-
173
- ### Build
174
-
175
- ```bash
176
- npm install
177
- npm run build
178
- ```
179
-
180
- ### Lint
181
-
182
- ```bash
183
- npm run lint
184
- npm run lintfix # Auto-fix issues
185
- ```
186
-
187
- ### Testing
188
-
189
- Link the node to your n8n installation:
190
-
191
- ```bash
192
- npm run build && npm link
193
- cd ~/.n8n && npm link n8n-nodes-soniox-api
194
- n8n start
195
- ```
196
-
197
- Then test the node in your n8n workflows.
198
-
199
- ## Version History
200
-
201
- See [CHANGELOG.md](./CHANGELOG.md) for detailed release notes.
202
-
203
- ## License
204
-
205
- [MIT](LICENSE.md)
206
-
207
- ## Contributing
208
-
209
- Contributions are welcome! Please read [CONTRIBUTING.md](./CONTRIBUTING.md) for details on our code of conduct and the process for submitting pull requests.
210
-
211
- ## Author
212
-
213
- **mazix**
214
- - GitHub: [@mazixs](https://github.com/mazixs)
215
- - npm: [n8n-nodes-soniox-api](https://www.npmjs.com/package/n8n-nodes-soniox-api)
216
-
217
- ## Support
218
-
219
- If you encounter issues or have questions:
220
- 1. Check the [documentation](./docs)
221
- 2. Search [existing issues](https://github.com/mazixs/n8n-nodes-soniox-api/issues)
222
- 3. Create a [new issue](https://github.com/mazixs/n8n-nodes-soniox-api/issues/new) if needed
223
-
224
- ---
225
-
226
- **Made with ❤️ for the n8n community**
1
+ # n8n-nodes-soniox-api
2
+
3
+ [![npm version](https://img.shields.io/npm/v/n8n-nodes-soniox-api.svg)](https://www.npmjs.com/package/n8n-nodes-soniox-api)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+ [![n8n Community Node](https://img.shields.io/badge/n8n-Community%20Node-blue)](https://docs.n8n.io/integrations/community-nodes/)
6
+
7
+ This is an n8n community node that integrates [Soniox Speech-to-Text API](https://soniox.com/) — a high-accuracy, multilingual speech recognition system.
8
+
9
+ **Features:**
10
+ - 🎯 **One-node transcription** (like Whisper node)
11
+ - 🌊 **Streaming Uploads** — Efficiently handle large files without memory issues
12
+ - 🧹 **Auto-Cleanup** — Options to automatically delete files and transcriptions from Soniox servers
13
+ - 🌍 **60+ languages supported**
14
+ - 🎭 **Speaker diarization**
15
+ - 🔄 **Real-time translations**
16
+ - **Async processing with auto-polling**
17
+
18
+ [n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/reference/license/) workflow automation platform.
19
+
20
+ [Installation](#installation) ·
21
+ [Operations](#operations) ·
22
+ [Credentials](#credentials) ·
23
+ [Usage](#usage) ·
24
+ [Resources](#resources)
25
+
26
+ ## Installation
27
+
28
+ ### n8n Community Nodes
29
+
30
+ 1. Go to **Settings → Community Nodes** in your n8n instance
31
+ 2. Click **Install** and enter: `n8n-nodes-soniox-api`
32
+ 3. Click **Install**
33
+ 4. Restart n8n to load the node
34
+
35
+ ### Manual Installation
36
+
37
+ To get started locally, install the node in your n8n root directory:
38
+
39
+ ```bash
40
+ cd ~/.n8n
41
+ npm install n8n-nodes-soniox-api
42
+ ```
43
+
44
+ For Docker-based n8n installations, add the package to your n8n installation:
45
+
46
+ ```bash
47
+ docker exec -it n8n npm install n8n-nodes-soniox-api
48
+ ```
49
+
50
+ ### Development
51
+
52
+ For local development and testing:
53
+
54
+ ```bash
55
+ git clone https://github.com/mazixs/n8n-nodes-soniox-api.git
56
+ cd n8n-nodes-soniox-api
57
+ npm install
58
+ npm run build
59
+ npm link
60
+
61
+ # Link to your n8n installation
62
+ cd ~/.n8n
63
+ npm link n8n-nodes-soniox-api
64
+ ```
65
+
66
+ ## Operations
67
+
68
+ ### Transcription Operations (Recommended)
69
+ - **Transcribe** 🆕 — All-in-one audio transcription (like Whisper node)
70
+ - Input: Binary audio data
71
+ - Output: Complete transcript with text + tokens + metadata
72
+ - Automatically handles: upload create wait get transcript
73
+ - Configurable: model, language, speaker diarization, translations, timeout
74
+ - **Get** Retrieve existing transcription result by ID
75
+ - **List** — List all transcriptions (with pagination)
76
+
77
+ ### File Operations (Advanced)
78
+ - **Upload** Upload audio files (multipart/form-data support)
79
+ - **Get** — Retrieve file by ID
80
+ - **Get All** — List all files (with pagination)
81
+ - **Delete** — Delete a file
82
+
83
+ ### Model Operations
84
+ - **Get All** — List available speech recognition models
85
+
86
+ ### Deprecated Operations
87
+ The following operations still work but will be removed in v1.0.0:
88
+ - **Create** use **Transcribe** instead
89
+ - **Create and Wait** → use **Transcribe** instead
90
+ - **Get By File** → use **Get** instead
91
+
92
+ ## Credentials
93
+
94
+ ### Setting up Credentials
95
+
96
+ 1. In n8n, navigate to **Credentials → Add Credential → Soniox API**
97
+ 2. Enter your credentials:
98
+ - **API Key**: Get your API key from [console.soniox.com](https://console.soniox.com/)
99
+ - **API URL**: `https://api.soniox.com/v1` (default)
100
+ 3. Click **Save**
101
+
102
+ ## Usage
103
+
104
+ ### Quick Start (Recommended)
105
+
106
+ The simplest way to transcribe audio - just **one node**:
107
+
108
+ ```
109
+ [Read Binary File] → [Soniox: Transcribe] → Done!
110
+ ```
111
+
112
+ **Node Configuration:**
113
+
114
+ **Soniox: Transcribe**
115
+ - Resource: `Transcription`
116
+ - Operation: `Transcribe`
117
+ - Binary Property: `data`
118
+ - Model: `Realtime or Async` (or any model from dropdown)
119
+ - Additional Fields:
120
+ - Language: `en` (optional, auto-detected if not specified)
121
+ - Context: Domain-specific terms (optional)
122
+ - Translation Languages: `ru,es,fr` (optional)
123
+ - Enable Speaker Diarization: `true` (optional)
124
+ - Delete Audio File: `true` (default: true) - Clean up file after transcription
125
+ - Delete Transcription: `true` (default: false) - Delete transcription from server after retrieval
126
+
127
+ **Output:**
128
+ ```json
129
+ {
130
+ "transcript": {
131
+ "text": "Full transcribed text here",
132
+ "tokens": [
133
+ {"text": "Hello", "start_ms": 10, "confidence": 0.95}
134
+ ]
135
+ },
136
+ "status": "completed",
137
+ "model": "stt-async-v3",
138
+ "audio_duration_ms": 16079
139
+ }
140
+ ```
141
+
142
+ ### Advanced Workflow (Multiple Nodes)
143
+
144
+ For more control, use separate nodes:
145
+
146
+ ```
147
+ [Read Binary File]
148
+
149
+ [Soniox: File Upload]
150
+
151
+ [Soniox: Create and Wait]
152
+
153
+ [Process Result]
154
+ ```
155
+
156
+ **Note:** The advanced workflow requires 2-3 nodes. We recommend using **Transcribe** for simplicity.
157
+
158
+ ## Features
159
+
160
+ - ✅ **Retry Logic** — Automatic retry with exponential backoff for failed requests
161
+ - ✅ **Rate Limiting** — Smart handling of 429 responses with Retry-After headers
162
+ - ✅ **Timeout Control** — Configurable timeouts for API and file upload operations
163
+ - ✅ **Type Safety** — Full TypeScript implementation with n8n-workflow types
164
+ - ✅ **Error Handling** — Comprehensive error messages for debugging
165
+
166
+ ## Resources
167
+
168
+ - [n8n community nodes documentation](https://docs.n8n.io/integrations/community-nodes/)
169
+ - [Soniox API Documentation](https://soniox.com/docs/stt/api-reference)
170
+ - [Soniox Console](https://console.soniox.com/)
171
+
172
+ ## Development
173
+
174
+ ### Build
175
+
176
+ ```bash
177
+ npm install
178
+ npm run build
179
+ ```
180
+
181
+ ### Lint
182
+
183
+ ```bash
184
+ npm run lint
185
+ npm run lintfix # Auto-fix issues
186
+ ```
187
+
188
+ ### Testing
189
+
190
+ Link the node to your n8n installation:
191
+
192
+ ```bash
193
+ npm run build && npm link
194
+ cd ~/.n8n && npm link n8n-nodes-soniox-api
195
+ n8n start
196
+ ```
197
+
198
+ Then test the node in your n8n workflows.
199
+
200
+ ## Version History
201
+
202
+ See [CHANGELOG.md](./CHANGELOG.md) for detailed release notes.
203
+
204
+ ## License
205
+
206
+ [MIT](LICENSE.md)
207
+
208
+ ## Contributing
209
+
210
+ Contributions are welcome! Please read [CONTRIBUTING.md](./CONTRIBUTING.md) for details on our code of conduct and the process for submitting pull requests.
211
+
212
+ ## Author
213
+
214
+ **mazix**
215
+ - GitHub: [@mazixs](https://github.com/mazixs)
216
+ - npm: [n8n-nodes-soniox-api](https://www.npmjs.com/package/n8n-nodes-soniox-api)
217
+
218
+ ## Support
219
+
220
+ If you encounter issues or have questions:
221
+ 1. Check the [documentation](./docs)
222
+ 2. Search [existing issues](https://github.com/mazixs/n8n-nodes-soniox-api/issues)
223
+ 3. Create a [new issue](https://github.com/mazixs/n8n-nodes-soniox-api/issues/new) if needed
224
+
225
+ ---
226
+
227
+ **Made with ❤️ for the n8n community**
@@ -2,44 +2,42 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SonioxApi = void 0;
4
4
  class SonioxApi {
5
- constructor() {
6
- this.name = 'sonioxApi';
7
- this.displayName = 'Soniox API';
8
- this.documentationUrl = 'https://soniox.com/docs/stt/get-started';
9
- this.icon = 'file:soniox.svg';
10
- this.properties = [
11
- {
12
- displayName: 'API Key',
13
- name: 'apiKey',
14
- type: 'string',
15
- typeOptions: { password: true },
16
- default: '',
17
- required: true,
18
- description: 'The Soniox API key for authentication',
5
+ name = 'sonioxApi';
6
+ displayName = 'Soniox API';
7
+ documentationUrl = 'https://soniox.com/docs/stt/get-started';
8
+ icon = 'file:soniox.svg';
9
+ properties = [
10
+ {
11
+ displayName: 'API Key',
12
+ name: 'apiKey',
13
+ type: 'string',
14
+ typeOptions: { password: true },
15
+ default: '',
16
+ required: true,
17
+ description: 'The Soniox API key for authentication',
18
+ },
19
+ {
20
+ displayName: 'API URL',
21
+ name: 'apiUrl',
22
+ type: 'string',
23
+ default: 'https://api.soniox.com/v1',
24
+ description: 'The base URL for Soniox API',
25
+ },
26
+ ];
27
+ authenticate = {
28
+ type: 'generic',
29
+ properties: {
30
+ headers: {
31
+ 'Authorization': '={{`Bearer ${$credentials.apiKey}`}}',
19
32
  },
20
- {
21
- displayName: 'API URL',
22
- name: 'apiUrl',
23
- type: 'string',
24
- default: 'https://api.soniox.com/v1',
25
- description: 'The base URL for Soniox API',
26
- },
27
- ];
28
- this.authenticate = {
29
- type: 'generic',
30
- properties: {
31
- headers: {
32
- 'Authorization': '={{`Bearer ${$credentials.apiKey}`}}',
33
- },
34
- },
35
- };
36
- this.test = {
37
- request: {
38
- baseURL: '={{$credentials.apiUrl}}',
39
- url: '/models',
40
- method: 'GET',
41
- },
42
- };
43
- }
33
+ },
34
+ };
35
+ test = {
36
+ request: {
37
+ baseURL: '={{$credentials.apiUrl}}',
38
+ url: '/models',
39
+ method: 'GET',
40
+ },
41
+ };
44
42
  }
45
43
  exports.SonioxApi = SonioxApi;
@@ -1,11 +1,11 @@
1
- <svg viewBox="-5 -15 110 50" xmlns="http://www.w3.org/2000/svg">
2
- <title>Soniox</title>
3
- <g fill="#FFFFFF">
4
- <path d="m0 14.866 2.1606-3.5214c1.8927 1.2576 3.9669 1.8995 5.6694 1.8995 1.0025 0 1.4606-0.3036 1.4606-0.8847v-0.0607c0-0.6419-0.9161-0.9194-2.6532-1.4138-3.2582-0.8587-5.8509-1.9602-5.8509-5.2995v-0.06938c0-3.5214 2.8088-5.4903 6.6114-5.4903 2.4112 0 4.9089 0.70255 6.8016 1.9342l-1.9791 3.6775c-1.7112-0.95408-3.5693-1.5352-4.8744-1.5352-0.88152 0-1.3396 0.33827-1.3396 0.79796v0.06071c0 0.64184 0.94202 0.95409 2.6792 1.4745 3.2582 0.91939 5.8509 2.0556 5.8509 5.2735v0.0607c0 3.6515-2.7137 5.551-6.741 5.551-2.7656-0.0087-5.5052-0.798-7.7955-2.4546z"/>
5
- <path d="m16.135 8.7342v-0.06071c0-4.7184 3.8372-8.6735 9.1436-8.6735 5.2719 0 9.0832 3.8944 9.0832 8.6127v0.06072c0 4.7184-3.8372 8.6735-9.1437 8.6735-5.2718 0-9.0831-3.8944-9.0831-8.6128zm12.583 0v-0.06071c0-2.0209-1.4606-3.7383-3.5088-3.7383-2.1001 0-3.4483 1.6826-3.4483 3.6775v0.06072c0 2.0209 1.4605 3.7383 3.5088 3.7383 2.1087 0 3.4483-1.6827 3.4483-3.6776z"/>
6
- <path d="m36.877 0.36428h5.7904v2.3332c1.063-1.3791 2.5927-2.6974 4.9348-2.6974 3.5089 0 5.609 2.3332 5.609 6.0974v10.85h-5.7905v-8.977c0-1.8041-0.942-2.7929-2.3161-2.7929-1.4001 0-2.4372 0.9801-2.4372 2.7929v8.977h-5.7904z"/>
7
- <path d="m55.951 0.36426h5.7904v16.584h-5.7904z"/>
8
- <path d="m64.29 8.7342v-0.06071c0-4.7184 3.8373-8.6735 9.1437-8.6735 5.2719 0 9.0832 3.8944 9.0832 8.6127v0.06072c0 4.7184-3.8372 8.6735-9.1437 8.6735-5.2719 0-9.0832-3.8944-9.0832-8.6128zm12.592 0v-0.06071c0-2.0209-1.4605-3.7383-3.5088-3.7383-2.1001 0-3.4483 1.6826-3.4483 3.6775v0.06072c0 2.0209 1.4606 3.7383 3.5088 3.7383 2.1088 0 3.4483-1.6827 3.4483-3.6776z"/>
9
- <path d="m88.082 8.578-5.4533-8.2138h6.2484l2.4372 4.0765 2.4371-4.0765h6.1275l-5.4274 8.1791 5.5484 8.3959h-6.2225l-2.5582-4.2587-2.5927 4.2587h-6.0929z"/>
10
- </g>
1
+ <svg viewBox="-5 -15 110 50" xmlns="http://www.w3.org/2000/svg">
2
+ <title>Soniox</title>
3
+ <g fill="#FFFFFF">
4
+ <path d="m0 14.866 2.1606-3.5214c1.8927 1.2576 3.9669 1.8995 5.6694 1.8995 1.0025 0 1.4606-0.3036 1.4606-0.8847v-0.0607c0-0.6419-0.9161-0.9194-2.6532-1.4138-3.2582-0.8587-5.8509-1.9602-5.8509-5.2995v-0.06938c0-3.5214 2.8088-5.4903 6.6114-5.4903 2.4112 0 4.9089 0.70255 6.8016 1.9342l-1.9791 3.6775c-1.7112-0.95408-3.5693-1.5352-4.8744-1.5352-0.88152 0-1.3396 0.33827-1.3396 0.79796v0.06071c0 0.64184 0.94202 0.95409 2.6792 1.4745 3.2582 0.91939 5.8509 2.0556 5.8509 5.2735v0.0607c0 3.6515-2.7137 5.551-6.741 5.551-2.7656-0.0087-5.5052-0.798-7.7955-2.4546z"/>
5
+ <path d="m16.135 8.7342v-0.06071c0-4.7184 3.8372-8.6735 9.1436-8.6735 5.2719 0 9.0832 3.8944 9.0832 8.6127v0.06072c0 4.7184-3.8372 8.6735-9.1437 8.6735-5.2718 0-9.0831-3.8944-9.0831-8.6128zm12.583 0v-0.06071c0-2.0209-1.4606-3.7383-3.5088-3.7383-2.1001 0-3.4483 1.6826-3.4483 3.6775v0.06072c0 2.0209 1.4605 3.7383 3.5088 3.7383 2.1087 0 3.4483-1.6827 3.4483-3.6776z"/>
6
+ <path d="m36.877 0.36428h5.7904v2.3332c1.063-1.3791 2.5927-2.6974 4.9348-2.6974 3.5089 0 5.609 2.3332 5.609 6.0974v10.85h-5.7905v-8.977c0-1.8041-0.942-2.7929-2.3161-2.7929-1.4001 0-2.4372 0.9801-2.4372 2.7929v8.977h-5.7904z"/>
7
+ <path d="m55.951 0.36426h5.7904v16.584h-5.7904z"/>
8
+ <path d="m64.29 8.7342v-0.06071c0-4.7184 3.8373-8.6735 9.1437-8.6735 5.2719 0 9.0832 3.8944 9.0832 8.6127v0.06072c0 4.7184-3.8372 8.6735-9.1437 8.6735-5.2719 0-9.0832-3.8944-9.0832-8.6128zm12.592 0v-0.06071c0-2.0209-1.4605-3.7383-3.5088-3.7383-2.1001 0-3.4483 1.6826-3.4483 3.6775v0.06072c0 2.0209 1.4606 3.7383 3.5088 3.7383 2.1088 0 3.4483-1.6827 3.4483-3.6776z"/>
9
+ <path d="m88.082 8.578-5.4533-8.2138h6.2484l2.4372 4.0765 2.4371-4.0765h6.1275l-5.4274 8.1791 5.5484 8.3959h-6.2225l-2.5582-4.2587-2.5927 4.2587h-6.0929z"/>
10
+ </g>
11
11
  </svg>
@@ -12,7 +12,6 @@ async function delay(attempt) {
12
12
  return new Promise((resolve) => setTimeout(resolve, delayMs));
13
13
  }
14
14
  async function sonioxApiRequest(method, endpoint, body = {}, qs = {}, uri, option = {}) {
15
- var _a, _b;
16
15
  const credentials = await this.getCredentials('sonioxApi');
17
16
  const options = {
18
17
  method,
@@ -41,7 +40,7 @@ async function sonioxApiRequest(method, endpoint, body = {}, qs = {}, uri, optio
41
40
  }
42
41
  catch (error) {
43
42
  lastError = error;
44
- const statusCode = error.statusCode || ((_a = error.response) === null || _a === void 0 ? void 0 : _a.statusCode);
43
+ const statusCode = error.statusCode || error.response?.statusCode;
45
44
  // Проверяем, нужен ли retry
46
45
  const shouldRetry = attempt < constants_1.RETRY_CONFIG.MAX_RETRIES &&
47
46
  (constants_1.RETRYABLE_STATUS_CODES.includes(statusCode) || error.code === 'ETIMEDOUT' || error.code === 'ECONNRESET');
@@ -50,7 +49,7 @@ async function sonioxApiRequest(method, endpoint, body = {}, qs = {}, uri, optio
50
49
  }
51
50
  // Обработка rate limiting (429)
52
51
  if (statusCode === 429) {
53
- const retryAfter = (_b = error.response) === null || _b === void 0 ? void 0 : _b.headers['retry-after'];
52
+ const retryAfter = error.response?.headers['retry-after'];
54
53
  if (retryAfter) {
55
54
  const waitMs = parseInt(retryAfter, 10) * 1000;
56
55
  await new Promise((resolve) => setTimeout(resolve, waitMs));