@opensecret/react 1.4.2 → 1.4.3
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/dist/index.d.ts +8 -22
- package/dist/opensecret-react.es.js +256 -257
- package/dist/opensecret-react.umd.js +12 -12
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1403,7 +1403,6 @@ export declare type OpenSecretContextType = {
|
|
|
1403
1403
|
* - model: Model to use (default: "whisper-large-v3", routes to Tinfoil's whisper-large-v3-turbo)
|
|
1404
1404
|
* - language: Optional ISO-639-1 language code (e.g., "en", "es", "fr")
|
|
1405
1405
|
* - prompt: Optional context or previous segment transcript
|
|
1406
|
-
* - response_format: Format of the response (default: "json")
|
|
1407
1406
|
* - temperature: Sampling temperature between 0 and 1 (default: 0.0)
|
|
1408
1407
|
*
|
|
1409
1408
|
* Supported audio formats: MP3, WAV, MP4, M4A, FLAC, OGG, WEBM
|
|
@@ -2166,7 +2165,11 @@ declare type ThirdPartyTokenResponse = {
|
|
|
2166
2165
|
/**
|
|
2167
2166
|
* Transcribes audio using the Whisper API
|
|
2168
2167
|
* @param file - The audio file to transcribe (File or Blob object)
|
|
2169
|
-
* @param
|
|
2168
|
+
* @param model - Model to use (default: "whisper-large-v3")
|
|
2169
|
+
* @param language - Optional ISO-639-1 language code (e.g., "en", "es", "fr")
|
|
2170
|
+
* @param prompt - Optional context or previous segment transcript
|
|
2171
|
+
* @param temperature - Sampling temperature between 0 and 1
|
|
2172
|
+
* @param apiKey - Optional API key to use instead of JWT token
|
|
2170
2173
|
* @returns A promise resolving to the transcription response
|
|
2171
2174
|
* @throws {Error} If:
|
|
2172
2175
|
* - The user is not authenticated
|
|
@@ -2175,13 +2178,7 @@ declare type ThirdPartyTokenResponse = {
|
|
|
2175
2178
|
*
|
|
2176
2179
|
* @description
|
|
2177
2180
|
* This function transcribes audio using OpenAI's Whisper model via the encrypted API.
|
|
2178
|
-
*
|
|
2179
|
-
* Options:
|
|
2180
|
-
* - model: Model to use (default: "whisper-large-v3", routes to Tinfoil's whisper-large-v3-turbo)
|
|
2181
|
-
* - language: Optional ISO-639-1 language code (e.g., "en", "es", "fr")
|
|
2182
|
-
* - prompt: Optional context or previous segment transcript
|
|
2183
|
-
* - response_format: Format of the response (default: "json")
|
|
2184
|
-
* - temperature: Sampling temperature between 0 and 1 (default: 0.0)
|
|
2181
|
+
* Default model "whisper-large-v3" routes to Tinfoil's whisper-large-v3-turbo.
|
|
2185
2182
|
*
|
|
2186
2183
|
* Supported audio formats:
|
|
2187
2184
|
* - MP3 (audio/mpeg)
|
|
@@ -2195,21 +2192,11 @@ declare type ThirdPartyTokenResponse = {
|
|
|
2195
2192
|
* Example usage:
|
|
2196
2193
|
* ```typescript
|
|
2197
2194
|
* const audioFile = new File([audioData], "recording.mp3", { type: "audio/mpeg" });
|
|
2198
|
-
* const result = await transcribeAudio(audioFile,
|
|
2199
|
-
* language: "en",
|
|
2200
|
-
* prompt: "This is a technical discussion about AI"
|
|
2201
|
-
* });
|
|
2195
|
+
* const result = await transcribeAudio(audioFile, undefined, "en", "Meeting about Q4");
|
|
2202
2196
|
* console.log(result.text);
|
|
2203
2197
|
* ```
|
|
2204
2198
|
*/
|
|
2205
|
-
declare function transcribeAudio(file: File | Blob,
|
|
2206
|
-
model?: string;
|
|
2207
|
-
language?: string;
|
|
2208
|
-
prompt?: string;
|
|
2209
|
-
response_format?: string;
|
|
2210
|
-
temperature?: number;
|
|
2211
|
-
apiKey?: string;
|
|
2212
|
-
}): Promise<WhisperTranscriptionResponse>;
|
|
2199
|
+
declare function transcribeAudio(file: File | Blob, model?: string, language?: string, prompt?: string, temperature?: number, apiKey?: string): Promise<WhisperTranscriptionResponse>;
|
|
2213
2200
|
|
|
2214
2201
|
declare function updateEmailSettings(orgId: string, projectId: string, settings: EmailSettings): Promise<EmailSettings>;
|
|
2215
2202
|
|
|
@@ -2322,7 +2309,6 @@ declare type WhisperTranscriptionRequest = {
|
|
|
2322
2309
|
model: string;
|
|
2323
2310
|
language?: string;
|
|
2324
2311
|
prompt?: string;
|
|
2325
|
-
response_format?: string;
|
|
2326
2312
|
temperature?: number;
|
|
2327
2313
|
};
|
|
2328
2314
|
|