@tapra/sdk 0.1.0 → 0.1.2
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/README.md +61 -41
- package/dist/lib/index.d.ts +2 -0
- package/dist/lib/index.js +3 -1
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/pricing.d.ts +70 -0
- package/dist/lib/pricing.js +67 -0
- package/dist/lib/pricing.js.map +1 -0
- package/dist/src/api/resources/speech/client/Client.d.ts +2 -2
- package/dist/src/api/resources/speech/client/Client.js +2 -11
- package/dist/src/api/resources/speech/client/Client.js.map +1 -1
- package/dist/src/api/resources/speech/client/requests/SpeechRequest.d.ts +2 -8
- package/dist/src/api/resources/speech/client/requests/SpeechRequest.js.map +1 -1
- package/dist/src/api/types/Conversion.d.ts +2 -0
- package/dist/src/api/types/Conversion.js.map +1 -1
- package/dist/src/api/types/ConversionSegment.d.ts +10 -0
- package/dist/src/api/types/ConversionSegment.js +3 -0
- package/dist/src/api/types/ConversionSegment.js.map +1 -0
- package/dist/src/api/types/index.d.ts +1 -0
- package/dist/src/api/types/index.js +1 -0
- package/dist/src/api/types/index.js.map +1 -1
- package/dist/src/environments.d.ts +1 -1
- package/dist/src/environments.js +1 -1
- package/dist/src/environments.js.map +1 -1
- package/package.json +30 -30
package/README.md
CHANGED
|
@@ -1,41 +1,61 @@
|
|
|
1
|
-
# Tapra TypeScript SDK
|
|
2
|
-
|
|
3
|
-
Official TypeScript client for the Tapra API: Tunisian Arabic / French / English
|
|
4
|
-
code-switching transcription, speech, translation, and Arabizi ↔ Arabic conversion.
|
|
5
|
-
ESM, Node.js 22+ and modern browsers, no runtime dependencies.
|
|
6
|
-
|
|
7
|
-
```ts
|
|
8
|
-
import { TapraClient, Tapra } from '@tapra/sdk';
|
|
9
|
-
|
|
10
|
-
const client = new TapraClient(
|
|
11
|
-
|
|
12
|
-
const transcript = await client.transcriptions.create({ file: audioFile, timestamps: 'word' });
|
|
13
|
-
await client.script.convert({ text: '3lech 7abit l9anoun?', direction: 'ZI2AR' });
|
|
14
|
-
|
|
15
|
-
for await (const event of await client.translations.createStream({ input: 'عندي برشا خدمة', target: 'French' })) {
|
|
16
|
-
process.stdout.write(event.delta ?? '');
|
|
17
|
-
}
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
session
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
1
|
+
# Tapra TypeScript SDK
|
|
2
|
+
|
|
3
|
+
Official TypeScript client for the Tapra API: Tunisian Arabic / French / English
|
|
4
|
+
code-switching transcription, speech, translation, and Arabizi ↔ Arabic conversion.
|
|
5
|
+
ESM, Node.js 22+ and modern browsers, no runtime dependencies.
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import { TapraClient, Tapra } from '@tapra/sdk';
|
|
9
|
+
|
|
10
|
+
const client = new TapraClient(); // https://api.tapra.tn; apiKey defaults to TAPRA_API_KEY
|
|
11
|
+
|
|
12
|
+
const transcript = await client.transcriptions.create({ file: audioFile, timestamps: 'word' });
|
|
13
|
+
await client.script.convert({ text: '3lech 7abit l9anoun?', direction: 'ZI2AR' });
|
|
14
|
+
|
|
15
|
+
for await (const event of await client.translations.createStream({ input: 'عندي برشا خدمة', target: 'French' })) {
|
|
16
|
+
process.stdout.write(event.delta ?? '');
|
|
17
|
+
}
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Pass `baseUrl` to target another host, such as a local model host.
|
|
21
|
+
|
|
22
|
+
Errors are typed (`Tapra.PaymentRequiredError` for HTTP 402, …) and carry `body.error.type`.
|
|
23
|
+
Pass `{ idempotencyKey }` as request options to retry metered requests safely, and call
|
|
24
|
+
`.withRawResponse()` to read `x-tapra-cost-tnd`.
|
|
25
|
+
|
|
26
|
+
## Realtime transcription
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
import { connectRealtime } from '@tapra/sdk';
|
|
30
|
+
|
|
31
|
+
const session = await connectRealtime({ language: 'ar-AR' }); // wss://api.tapra.tn
|
|
32
|
+
session.on('partial', (event) => render(event.text));
|
|
33
|
+
session.sendAudio(pcmChunk); // mono pcm_s16le, 16 kHz
|
|
34
|
+
const final = await session.stop();
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The key is sent as the `tapra-auth.<key>` WebSocket subprotocol, never in the URL. In a browser,
|
|
38
|
+
pass a short-lived session token as `apiKey`, not a permanent key.
|
|
39
|
+
|
|
40
|
+
## Prices
|
|
41
|
+
|
|
42
|
+
Tapra charges in TND. The SDK does not hardcode any price or dollar amount: it reads the
|
|
43
|
+
same live price list the website and the meter use.
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
import { fetchTapraPrices, estimateCostTnd, estimateCostUsd } from '@tapra/sdk';
|
|
47
|
+
|
|
48
|
+
const prices = await fetchTapraPrices(); // GET https://www.tapra.tn/api/pricing, no key needed
|
|
49
|
+
|
|
50
|
+
estimateCostTnd(prices, 'tts', 1200); // 0.24 TND — 1,200 characters
|
|
51
|
+
estimateCostUsd(prices, 'tts', 1200); // ≈ $0.08, at the rate the list was fetched with
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
`estimateCostMicroTnd` returns the exact integer amount the meter charges, including the
|
|
55
|
+
per-request minimum for text products. The endpoint also returns `tndPerUsd` and the date of
|
|
56
|
+
the published rate, so a UI can show which rate it used.
|
|
57
|
+
|
|
58
|
+
## Development
|
|
59
|
+
|
|
60
|
+
`src/` is generated by Fern from `openapi/tapra-api.json`; do not edit it by hand.
|
|
61
|
+
`lib/` (package entry, realtime helper, price list) is hand-written. Tests: `sdks/tests/typescript`.
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export * from '../src/index.js';
|
|
2
2
|
export { RealtimeError, RealtimeSession, connectRealtime, transcribeStream } from './realtime.js';
|
|
3
3
|
export type { AudioChunk, RealtimeOptions, WebSocketLike } from './realtime.js';
|
|
4
|
+
export { TAPRA_PRICING_URL, estimateCostMicroTnd, estimateCostTnd, estimateCostUsd, fetchTapraPrices, formatUsd, tndToUsd, usdToTnd } from './pricing.js';
|
|
5
|
+
export type { TapraPrices, TapraServicePrice } from './pricing.js';
|
package/dist/lib/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// Package entry: the Fern-generated client (src/, never edit) plus the hand-written
|
|
2
|
-
// realtime WebSocket helper (lib/realtime.ts)
|
|
2
|
+
// realtime WebSocket helper (lib/realtime.ts) and the price-list helper
|
|
3
|
+
// (lib/pricing.ts).
|
|
3
4
|
export * from '../src/index.js';
|
|
4
5
|
export { RealtimeError, RealtimeSession, connectRealtime, transcribeStream } from './realtime.js';
|
|
6
|
+
export { TAPRA_PRICING_URL, estimateCostMicroTnd, estimateCostTnd, estimateCostUsd, fetchTapraPrices, formatUsd, tndToUsd, usdToTnd } from './pricing.js';
|
|
5
7
|
//# sourceMappingURL=index.js.map
|
package/dist/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,wEAAwE;AACxE,oBAAoB;AACpB,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAElG,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,SAAS,EACT,QAAQ,EACR,QAAQ,EACT,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tapra price list.
|
|
3
|
+
*
|
|
4
|
+
* Tapra charges in TND. The dollar figures in this package are never written
|
|
5
|
+
* down: they come from the same live rate the website and the meter use, which
|
|
6
|
+
* the SDK reads from `GET /api/pricing`.
|
|
7
|
+
*
|
|
8
|
+
* import { fetchTapraPrices, estimateCostTnd } from '@tapra/sdk';
|
|
9
|
+
*
|
|
10
|
+
* const prices = await fetchTapraPrices();
|
|
11
|
+
* const costTnd = estimateCostTnd(prices, 'tts', 1200);
|
|
12
|
+
*
|
|
13
|
+
* The endpoint is public, needs no key, and answers with the exact integer
|
|
14
|
+
* micro-TND amounts the meter charges.
|
|
15
|
+
*/
|
|
16
|
+
export declare const TAPRA_PRICING_URL = "https://www.tapra.tn/api/pricing";
|
|
17
|
+
export interface TapraServicePrice {
|
|
18
|
+
/** The exact model id sent to the API. */
|
|
19
|
+
model: string;
|
|
20
|
+
/** `audio_ms` for speech, `characters` for text. */
|
|
21
|
+
unit: 'audio_ms' | 'characters';
|
|
22
|
+
/** How many metered units one charge unit covers (60,000 ms or 1,000 chars). */
|
|
23
|
+
unitsPerChargeUnit: number;
|
|
24
|
+
/** The price of one charge unit in TND. */
|
|
25
|
+
tndPerUnit: number;
|
|
26
|
+
/** The same price in USD, at the rate the endpoint was fetched with. */
|
|
27
|
+
usdPerUnit: number;
|
|
28
|
+
/** The same price in exact micro-TND (1 TND = 1,000,000 micro-TND). */
|
|
29
|
+
microTndPerUnit: number;
|
|
30
|
+
/** The per-request floor in TND (text products only). */
|
|
31
|
+
minimumTnd: number;
|
|
32
|
+
/** The per-request floor in USD. */
|
|
33
|
+
minimumUsd: number;
|
|
34
|
+
}
|
|
35
|
+
export interface TapraPrices {
|
|
36
|
+
version: string;
|
|
37
|
+
currency: 'TND';
|
|
38
|
+
/** Units of TND per 1 USD. */
|
|
39
|
+
tndPerUsd: number;
|
|
40
|
+
/** Date the rate was published (ISO yyyy-mm-dd), when known. */
|
|
41
|
+
rateDate: string | null;
|
|
42
|
+
rateSource: 'frankfurter' | 'fallback';
|
|
43
|
+
microTndPerTnd: number;
|
|
44
|
+
minimumChargeMicroTnd: number;
|
|
45
|
+
welcomeCreditTnd: number;
|
|
46
|
+
topUpPackagesTnd: number[];
|
|
47
|
+
ttsFlashMultiplier: number;
|
|
48
|
+
services: Record<string, TapraServicePrice>;
|
|
49
|
+
}
|
|
50
|
+
/** Fetches the live price list. */
|
|
51
|
+
export declare function fetchTapraPrices(options?: {
|
|
52
|
+
baseUrl?: string;
|
|
53
|
+
signal?: AbortSignal;
|
|
54
|
+
fetch?: typeof fetch;
|
|
55
|
+
}): Promise<TapraPrices>;
|
|
56
|
+
/** Converts an amount in TND to USD at the rate of a fetched price list. */
|
|
57
|
+
export declare function tndToUsd(tnd: number, tndPerUsd: number): number;
|
|
58
|
+
/** Converts an amount in USD to TND at the rate of a fetched price list. */
|
|
59
|
+
export declare function usdToTnd(usd: number, tndPerUsd: number): number;
|
|
60
|
+
/** Formats a USD amount the way the site does: up to three decimals. */
|
|
61
|
+
export declare function formatUsd(value: number): string;
|
|
62
|
+
/**
|
|
63
|
+
* The charge for a request, in exact micro-TND, exactly as the meter computes
|
|
64
|
+
* it. `quantity` is audio milliseconds for speech and characters for text.
|
|
65
|
+
*/
|
|
66
|
+
export declare function estimateCostMicroTnd(prices: TapraPrices, service: string, quantity: number): number;
|
|
67
|
+
/** The charge for a request, in TND. */
|
|
68
|
+
export declare function estimateCostTnd(prices: TapraPrices, service: string, quantity: number): number;
|
|
69
|
+
/** The charge for a request, in USD, at the rate of the fetched price list. */
|
|
70
|
+
export declare function estimateCostUsd(prices: TapraPrices, service: string, quantity: number): number;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tapra price list.
|
|
3
|
+
*
|
|
4
|
+
* Tapra charges in TND. The dollar figures in this package are never written
|
|
5
|
+
* down: they come from the same live rate the website and the meter use, which
|
|
6
|
+
* the SDK reads from `GET /api/pricing`.
|
|
7
|
+
*
|
|
8
|
+
* import { fetchTapraPrices, estimateCostTnd } from '@tapra/sdk';
|
|
9
|
+
*
|
|
10
|
+
* const prices = await fetchTapraPrices();
|
|
11
|
+
* const costTnd = estimateCostTnd(prices, 'tts', 1200);
|
|
12
|
+
*
|
|
13
|
+
* The endpoint is public, needs no key, and answers with the exact integer
|
|
14
|
+
* micro-TND amounts the meter charges.
|
|
15
|
+
*/
|
|
16
|
+
export const TAPRA_PRICING_URL = 'https://www.tapra.tn/api/pricing';
|
|
17
|
+
/** Fetches the live price list. */
|
|
18
|
+
export async function fetchTapraPrices(options = {}) {
|
|
19
|
+
const url = options.baseUrl ? `${options.baseUrl.replace(/\/$/, '')}/api/pricing` : TAPRA_PRICING_URL;
|
|
20
|
+
const doFetch = options.fetch ?? fetch;
|
|
21
|
+
const response = await doFetch(url, { signal: options.signal });
|
|
22
|
+
if (!response.ok) {
|
|
23
|
+
throw new Error(`Could not load the Tapra price list (HTTP ${response.status}).`);
|
|
24
|
+
}
|
|
25
|
+
return (await response.json());
|
|
26
|
+
}
|
|
27
|
+
/** Converts an amount in TND to USD at the rate of a fetched price list. */
|
|
28
|
+
export function tndToUsd(tnd, tndPerUsd) {
|
|
29
|
+
if (!Number.isFinite(tnd) || !Number.isFinite(tndPerUsd) || tndPerUsd <= 0)
|
|
30
|
+
return 0;
|
|
31
|
+
return tnd / tndPerUsd;
|
|
32
|
+
}
|
|
33
|
+
/** Converts an amount in USD to TND at the rate of a fetched price list. */
|
|
34
|
+
export function usdToTnd(usd, tndPerUsd) {
|
|
35
|
+
if (!Number.isFinite(usd) || !Number.isFinite(tndPerUsd) || tndPerUsd <= 0)
|
|
36
|
+
return 0;
|
|
37
|
+
return usd * tndPerUsd;
|
|
38
|
+
}
|
|
39
|
+
/** Formats a USD amount the way the site does: up to three decimals. */
|
|
40
|
+
export function formatUsd(value) {
|
|
41
|
+
const fixed = value.toFixed(3);
|
|
42
|
+
return `$${fixed.includes('.') ? fixed.replace(/0+$/, '').replace(/\.$/, '') : fixed}`;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* The charge for a request, in exact micro-TND, exactly as the meter computes
|
|
46
|
+
* it. `quantity` is audio milliseconds for speech and characters for text.
|
|
47
|
+
*/
|
|
48
|
+
export function estimateCostMicroTnd(prices, service, quantity) {
|
|
49
|
+
const price = prices.services[service];
|
|
50
|
+
if (!price)
|
|
51
|
+
throw new Error(`Unknown Tapra service: ${service}`);
|
|
52
|
+
if (!Number.isFinite(quantity) || quantity < 0) {
|
|
53
|
+
throw new Error('Quantity must be a non-negative number.');
|
|
54
|
+
}
|
|
55
|
+
const units = Math.ceil(quantity);
|
|
56
|
+
const charge = Math.ceil((units * price.microTndPerUnit) / price.unitsPerChargeUnit);
|
|
57
|
+
return price.unit === 'characters' ? Math.max(prices.minimumChargeMicroTnd, charge) : charge;
|
|
58
|
+
}
|
|
59
|
+
/** The charge for a request, in TND. */
|
|
60
|
+
export function estimateCostTnd(prices, service, quantity) {
|
|
61
|
+
return estimateCostMicroTnd(prices, service, quantity) / prices.microTndPerTnd;
|
|
62
|
+
}
|
|
63
|
+
/** The charge for a request, in USD, at the rate of the fetched price list. */
|
|
64
|
+
export function estimateCostUsd(prices, service, quantity) {
|
|
65
|
+
return tndToUsd(estimateCostTnd(prices, service, quantity), prices.tndPerUsd);
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=pricing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pricing.js","sourceRoot":"","sources":["../../lib/pricing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG,kCAAkC,CAAC;AAqCpE,mCAAmC;AACnC,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,UAA4E,EAAE;IAE9E,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,C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SAAS,CAAC,CAAC;AAChF,CAAC"}
|
|
@@ -10,13 +10,13 @@ export declare namespace SpeechClient {
|
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* Tunisian Derja code-switch text-to-speech
|
|
13
|
+
* Tunisian Derja code-switch text-to-speech.
|
|
14
14
|
*/
|
|
15
15
|
export declare class SpeechClient {
|
|
16
16
|
protected readonly _options: NormalizedClientOptionsWithAuth<SpeechClient.Options>;
|
|
17
17
|
constructor(options?: SpeechClient.Options);
|
|
18
18
|
/**
|
|
19
|
-
* Generates a WAV clip from Derja, Arabizi, French, and English text.
|
|
19
|
+
* Generates a WAV clip from Derja, Arabizi, French, and English text. `instruct` shapes the voice. `response_format=wav` returns raw audio.
|
|
20
20
|
*
|
|
21
21
|
* @param {Tapra.SpeechRequest} request
|
|
22
22
|
* @param {SpeechClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -7,7 +7,7 @@ import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCode
|
|
|
7
7
|
import * as errors from "../../../../errors/index.js";
|
|
8
8
|
import * as Tapra from "../../../index.js";
|
|
9
9
|
/**
|
|
10
|
-
* Tunisian Derja code-switch text-to-speech
|
|
10
|
+
* Tunisian Derja code-switch text-to-speech.
|
|
11
11
|
*/
|
|
12
12
|
export class SpeechClient {
|
|
13
13
|
_options;
|
|
@@ -15,7 +15,7 @@ export class SpeechClient {
|
|
|
15
15
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
|
-
* Generates a WAV clip from Derja, Arabizi, French, and English text.
|
|
18
|
+
* Generates a WAV clip from Derja, Arabizi, French, and English text. `instruct` shapes the voice. `response_format=wav` returns raw audio.
|
|
19
19
|
*
|
|
20
20
|
* @param {Tapra.SpeechRequest} request
|
|
21
21
|
* @param {SpeechClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -76,15 +76,6 @@ export class SpeechClient {
|
|
|
76
76
|
if (request.instruct != null) {
|
|
77
77
|
_body.append("instruct", request.instruct);
|
|
78
78
|
}
|
|
79
|
-
if (request.ref_audio != null) {
|
|
80
|
-
await _body.appendFile("ref_audio", request.ref_audio);
|
|
81
|
-
}
|
|
82
|
-
if (request.ref_text != null) {
|
|
83
|
-
_body.append("ref_text", request.ref_text);
|
|
84
|
-
}
|
|
85
|
-
if (request.clone_voice != null) {
|
|
86
|
-
_body.append("clone_voice", request.clone_voice?.toString());
|
|
87
|
-
}
|
|
88
79
|
if (request.response_format != null) {
|
|
89
80
|
_body.append("response_format", request.response_format);
|
|
90
81
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Client.js","sourceRoot":"","sources":["../../../../../../src/api/resources/speech/client/Client.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAGhE,OAAO,EAAwC,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AACjH,OAAO,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACpF,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,YAAY,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,gDAAgD,CAAC;AAC1F,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAU3C;;GAEG;AACH,MAAM,OAAO,YAAY;IACF,QAAQ,CAAwD;IAEnF,YAAY,UAAgC,EAAE;QAC1C,IAAI,CAAC,QAAQ,GAAG,8BAA8B,CAAC,OAAO,CAAC,CAAC;IAC5D,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACI,MAAM,CACT,OAA4B,EAC5B,cAAsD;QAEtD,OAAO,IAAI,CAAC,mBAAmB,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC;IACxF,CAAC;IAE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EAAE,SAAS,CAAC,KAAK,CAAC,UAAU;wBACtC,IAAI,EAAE,SAAS,CAAC,KAAK,CAAC,IAAI;wBAC1B,WAAW,EAAE,SAAS,CAAC,WAAW;qBACrC,CAAC,CAAC;YACX,CAAC;QACL,CAAC;QAED,OAAO,wBAAwB,CAAC,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,kBAAkB,CAAC,CAAC;IACxG,CAAC;CACJ"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type * as core from "../../../../../core/index.js";
|
|
2
1
|
/**
|
|
3
2
|
* @example
|
|
4
3
|
* {
|
|
@@ -7,6 +6,7 @@ import type * as core from "../../../../../core/index.js";
|
|
|
7
6
|
*/
|
|
8
7
|
export interface SpeechRequest {
|
|
9
8
|
input: string;
|
|
9
|
+
/** `tapra-speak-v1` is accepted as an alias of the same model. */
|
|
10
10
|
model?: string;
|
|
11
11
|
/** `aeb` (Tunisian) uses Tapra; other codes use the multilingual engine. */
|
|
12
12
|
language?: string;
|
|
@@ -20,14 +20,8 @@ export interface SpeechRequest {
|
|
|
20
20
|
num_step?: number;
|
|
21
21
|
class_temperature?: number;
|
|
22
22
|
speed?: number;
|
|
23
|
-
/** Voice-design instruction
|
|
23
|
+
/** Voice-design instruction. */
|
|
24
24
|
instruct?: string;
|
|
25
|
-
/** Reference clip to clone. */
|
|
26
|
-
ref_audio?: core.file.Uploadable | undefined;
|
|
27
|
-
/** Transcript of ref_audio. */
|
|
28
|
-
ref_text?: string;
|
|
29
|
-
/** Instant voice clone, billed at 1.25× the Speech rate. */
|
|
30
|
-
clone_voice?: boolean;
|
|
31
25
|
response_format?: SpeechRequest.ResponseFormat;
|
|
32
26
|
}
|
|
33
27
|
export declare namespace SpeechRequest {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpeechRequest.js","sourceRoot":"","sources":["../../../../../../../src/api/resources/speech/client/requests/SpeechRequest.ts"],"names":[],"mappings":"AAAA,gEAAgE;
|
|
1
|
+
{"version":3,"file":"SpeechRequest.js","sourceRoot":"","sources":["../../../../../../../src/api/resources/speech/client/requests/SpeechRequest.ts"],"names":[],"mappings":"AAAA,gEAAgE;AA6BhE,MAAM,KAAW,aAAa,CAuB7B;AAvBD,WAAiB,aAAa;IACb,oBAAM,GAAG;QAClB,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,OAAO;QACd,SAAS,EAAE,WAAW;KAChB,CAAC;IAEE,gCAAkB,GAAG;QAC9B,MAAM,EAAE,QAAQ;QAChB,QAAQ,EAAE,UAAU;KACd,CAAC;IAEE,+BAAiB,GAAG;QAC7B,GAAG,EAAE,KAAK;QACV,SAAS,EAAE,WAAW;QACtB,MAAM,EAAE,QAAQ;KACV,CAAC;IAEE,4BAAc,GAAG;QAC1B,IAAI,EAAE,MAAM;QACZ,GAAG,EAAE,KAAK;KACJ,CAAC;AAEf,CAAC,EAvBgB,aAAa,KAAb,aAAa,QAuB7B"}
|
|
@@ -5,6 +5,8 @@ export interface Conversion {
|
|
|
5
5
|
direction: Conversion.Direction;
|
|
6
6
|
model: string;
|
|
7
7
|
processing_ms: number;
|
|
8
|
+
/** Sentence-level source/output pairs, in order (for alignment and display). */
|
|
9
|
+
segments?: Tapra.ConversionSegment[] | undefined;
|
|
8
10
|
usage: Tapra.Usage;
|
|
9
11
|
/** Accepts any additional properties */
|
|
10
12
|
[key: string]: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Conversion.js","sourceRoot":"","sources":["../../../../src/api/types/Conversion.ts"],"names":[],"mappings":"AAAA,gEAAgE;
|
|
1
|
+
{"version":3,"file":"Conversion.js","sourceRoot":"","sources":["../../../../src/api/types/Conversion.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAiBhE,MAAM,KAAW,UAAU,CAM1B;AAND,WAAiB,UAAU;IACV,oBAAS,GAAG;QACrB,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,OAAO;KACR,CAAC;AAEf,CAAC,EANgB,UAAU,KAAV,UAAU,QAM1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConversionSegment.js","sourceRoot":"","sources":["../../../../src/api/types/ConversionSegment.ts"],"names":[],"mappings":"AAAA,gEAAgE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
|
package/dist/src/environments.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environments.js","sourceRoot":"","sources":["../../src/environments.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAEhE,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"environments.js","sourceRoot":"","sources":["../../src/environments.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAEhE,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,OAAO,EAAE,sBAAsB;CACzB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@tapra/sdk",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Official TypeScript SDK for the Tapra API: Tunisian code-switching transcription, speech, translation, and script conversion.",
|
|
5
|
-
"license": "UNLICENSED",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"main": "./dist/lib/index.js",
|
|
8
|
-
"types": "./dist/lib/index.d.ts",
|
|
9
|
-
"exports": {
|
|
10
|
-
".": {
|
|
11
|
-
"types": "./dist/lib/index.d.ts",
|
|
12
|
-
"import": "./dist/lib/index.js"
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
"files": [
|
|
16
|
-
"dist"
|
|
17
|
-
],
|
|
18
|
-
"engines": {
|
|
19
|
-
"node": ">=22"
|
|
20
|
-
},
|
|
21
|
-
"scripts": {
|
|
22
|
-
"build": "tsc -p tsconfig.json",
|
|
23
|
-
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
24
|
-
"prepublishOnly": "npm run build"
|
|
25
|
-
},
|
|
26
|
-
"devDependencies": {
|
|
27
|
-
"@types/node": "^22.10.2",
|
|
28
|
-
"typescript": "~5.7.2"
|
|
29
|
-
}
|
|
30
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@tapra/sdk",
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "Official TypeScript SDK for the Tapra API: Tunisian code-switching transcription, speech, translation, and script conversion.",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/lib/index.js",
|
|
8
|
+
"types": "./dist/lib/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/lib/index.d.ts",
|
|
12
|
+
"import": "./dist/lib/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"engines": {
|
|
19
|
+
"node": ">=22"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "tsc -p tsconfig.json",
|
|
23
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
24
|
+
"prepublishOnly": "npm run build"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@types/node": "^22.10.2",
|
|
28
|
+
"typescript": "~5.7.2"
|
|
29
|
+
}
|
|
30
|
+
}
|