telnyx 6.71.0 → 6.72.0

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.
Files changed (111) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/client.d.mts +8 -8
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +8 -8
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -6
  7. package/client.js.map +1 -1
  8. package/client.mjs +6 -6
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/ai/ai.d.mts +1 -1
  12. package/resources/ai/ai.d.mts.map +1 -1
  13. package/resources/ai/ai.d.ts +1 -1
  14. package/resources/ai/ai.d.ts.map +1 -1
  15. package/resources/ai/ai.js +2 -2
  16. package/resources/ai/ai.js.map +1 -1
  17. package/resources/ai/ai.mjs +2 -2
  18. package/resources/ai/ai.mjs.map +1 -1
  19. package/resources/index.d.mts +2 -2
  20. package/resources/index.d.mts.map +1 -1
  21. package/resources/index.d.ts +2 -2
  22. package/resources/index.d.ts.map +1 -1
  23. package/resources/index.js.map +1 -1
  24. package/resources/index.mjs.map +1 -1
  25. package/resources/speech-to-text/index.d.mts +3 -3
  26. package/resources/speech-to-text/index.d.mts.map +1 -1
  27. package/resources/speech-to-text/index.d.ts +3 -3
  28. package/resources/speech-to-text/index.d.ts.map +1 -1
  29. package/resources/speech-to-text/index.js +1 -5
  30. package/resources/speech-to-text/index.js.map +1 -1
  31. package/resources/speech-to-text/index.mjs +0 -2
  32. package/resources/speech-to-text/index.mjs.map +1 -1
  33. package/resources/speech-to-text/internal-base.d.mts +42 -11
  34. package/resources/speech-to-text/internal-base.d.mts.map +1 -1
  35. package/resources/speech-to-text/internal-base.d.ts +42 -11
  36. package/resources/speech-to-text/internal-base.d.ts.map +1 -1
  37. package/resources/speech-to-text/internal-base.js +5 -9
  38. package/resources/speech-to-text/internal-base.js.map +1 -1
  39. package/resources/speech-to-text/internal-base.mjs +5 -9
  40. package/resources/speech-to-text/internal-base.mjs.map +1 -1
  41. package/resources/speech-to-text/speech-to-text.d.mts +79 -100
  42. package/resources/speech-to-text/speech-to-text.d.mts.map +1 -1
  43. package/resources/speech-to-text/speech-to-text.d.ts +79 -100
  44. package/resources/speech-to-text/speech-to-text.d.ts.map +1 -1
  45. package/resources/speech-to-text/speech-to-text.js +16 -19
  46. package/resources/speech-to-text/speech-to-text.js.map +1 -1
  47. package/resources/speech-to-text/speech-to-text.mjs +16 -19
  48. package/resources/speech-to-text/speech-to-text.mjs.map +1 -1
  49. package/resources/speech-to-text/ws-base.d.mts +106 -0
  50. package/resources/speech-to-text/ws-base.d.mts.map +1 -0
  51. package/resources/speech-to-text/ws-base.d.ts +106 -0
  52. package/resources/speech-to-text/ws-base.d.ts.map +1 -0
  53. package/resources/speech-to-text/ws-base.js +476 -0
  54. package/resources/speech-to-text/ws-base.js.map +1 -0
  55. package/resources/speech-to-text/ws-base.mjs +472 -0
  56. package/resources/speech-to-text/ws-base.mjs.map +1 -0
  57. package/resources/speech-to-text/ws.d.mts +9 -28
  58. package/resources/speech-to-text/ws.d.mts.map +1 -1
  59. package/resources/speech-to-text/ws.d.ts +9 -28
  60. package/resources/speech-to-text/ws.d.ts.map +1 -1
  61. package/resources/speech-to-text/ws.js +17 -97
  62. package/resources/speech-to-text/ws.js.map +1 -1
  63. package/resources/speech-to-text/ws.mjs +17 -97
  64. package/resources/speech-to-text/ws.mjs.map +1 -1
  65. package/resources/speech-to-text.d.mts +1 -80
  66. package/resources/speech-to-text.d.mts.map +1 -1
  67. package/resources/speech-to-text.d.ts +1 -80
  68. package/resources/speech-to-text.d.ts.map +1 -1
  69. package/resources/speech-to-text.js +2 -32
  70. package/resources/speech-to-text.js.map +1 -1
  71. package/resources/speech-to-text.mjs +1 -30
  72. package/resources/speech-to-text.mjs.map +1 -1
  73. package/resources/texml/accounts/calls/calls.d.mts +31 -465
  74. package/resources/texml/accounts/calls/calls.d.mts.map +1 -1
  75. package/resources/texml/accounts/calls/calls.d.ts +31 -465
  76. package/resources/texml/accounts/calls/calls.d.ts.map +1 -1
  77. package/resources/texml/accounts/calls/calls.js +7 -1
  78. package/resources/texml/accounts/calls/calls.js.map +1 -1
  79. package/resources/texml/accounts/calls/calls.mjs +7 -1
  80. package/resources/texml/accounts/calls/calls.mjs.map +1 -1
  81. package/resources/text-to-speech/index.d.mts +1 -1
  82. package/resources/text-to-speech/index.d.mts.map +1 -1
  83. package/resources/text-to-speech/index.d.ts +1 -1
  84. package/resources/text-to-speech/index.d.ts.map +1 -1
  85. package/resources/text-to-speech/index.js.map +1 -1
  86. package/resources/text-to-speech/index.mjs.map +1 -1
  87. package/resources/text-to-speech/text-to-speech.d.mts +79 -13
  88. package/resources/text-to-speech/text-to-speech.d.mts.map +1 -1
  89. package/resources/text-to-speech/text-to-speech.d.ts +79 -13
  90. package/resources/text-to-speech/text-to-speech.d.ts.map +1 -1
  91. package/resources/text-to-speech/text-to-speech.js +33 -1
  92. package/resources/text-to-speech/text-to-speech.js.map +1 -1
  93. package/resources/text-to-speech/text-to-speech.mjs +33 -1
  94. package/resources/text-to-speech/text-to-speech.mjs.map +1 -1
  95. package/src/client.ts +26 -20
  96. package/src/resources/ai/ai.ts +3 -3
  97. package/src/resources/index.ts +5 -2
  98. package/src/resources/speech-to-text/index.ts +6 -9
  99. package/src/resources/speech-to-text/internal-base.ts +49 -22
  100. package/src/resources/speech-to-text/speech-to-text.ts +102 -128
  101. package/src/resources/speech-to-text/ws-base.ts +619 -0
  102. package/src/resources/speech-to-text/ws.ts +26 -111
  103. package/src/resources/speech-to-text.ts +1 -112
  104. package/src/resources/texml/accounts/calls/calls.ts +36 -564
  105. package/src/resources/text-to-speech/index.ts +3 -2
  106. package/src/resources/text-to-speech/text-to-speech.ts +100 -16
  107. package/src/version.ts +1 -1
  108. package/version.d.mts +1 -1
  109. package/version.d.ts +1 -1
  110. package/version.js +1 -1
  111. package/version.mjs +1 -1
@@ -4,107 +4,27 @@ Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.SpeechToTextWS = void 0;
5
5
  const tslib_1 = require("../../internal/tslib.js");
6
6
  const WS = tslib_1.__importStar(require("ws"));
7
- const internal_base_1 = require("./internal-base.js");
8
- class SpeechToTextWS extends internal_base_1.SpeechToTextEmitter {
7
+ const ws_adapter_node_1 = require("../../internal/ws-adapter-node.js");
8
+ const ws_base_1 = require("./ws-base.js");
9
+ class SpeechToTextWS extends ws_base_1.SpeechToTextWSBase {
9
10
  constructor(client, parameters, options) {
10
- super();
11
- this.client = client;
12
- this.url = (0, internal_base_1.buildURL)(client, parameters);
13
- this.socket = new WS.WebSocket(this.url, {
14
- ...options,
15
- headers: {
16
- ...this.authHeaders(),
17
- ...options?.headers,
18
- },
19
- });
20
- this.socket.on('open', () => {
21
- // Connection established, ready to send audio
22
- });
23
- this.socket.on('message', (wsEvent) => {
24
- const event = (() => {
25
- try {
26
- return JSON.parse(wsEvent.toString());
27
- }
28
- catch (err) {
29
- this._onError(null, 'could not parse websocket event', err);
30
- return null;
31
- }
32
- })();
33
- if (event) {
34
- this._emit('event', event);
35
- if (event.type === 'error') {
36
- this._onError(event);
37
- }
38
- else {
39
- // @ts-ignore TS isn't smart enough to get the relationship right here
40
- this._emit(event.type, event);
41
- }
42
- }
43
- });
44
- this.socket.on('error', (err) => {
45
- this._onError(null, err.message, err);
46
- });
47
- this.socket.on('close', (code, reason) => {
48
- // Connection closed
49
- });
50
- }
51
- /**
52
- * Send binary audio data to the server for transcription.
53
- * @param data - Raw audio bytes (mp3 or wav format)
54
- */
55
- send(data) {
56
- try {
57
- this.socket.send(data);
58
- }
59
- catch (err) {
60
- this._onError(null, 'could not send audio data', err);
11
+ if (!WS?.WebSocket) {
12
+ throw new Error('SpeechToTextWS from "telnyx/resources/speech-to-text/ws" requires the "ws" package but it could not be loaded.');
61
13
  }
14
+ const { reconnect, maxQueueSize, ...wsOptions } = options ?? {};
15
+ super(client, parameters, { reconnect, maxQueueSize });
16
+ this._wsOptions = wsOptions;
17
+ this._connectInitial();
62
18
  }
63
- /**
64
- * Close the WebSocket connection.
65
- */
66
- close(props) {
67
- try {
68
- this.socket.close(props?.code ?? 1000, props?.reason ?? 'OK');
69
- }
70
- catch (err) {
71
- this._onError(null, 'could not close the connection', err);
72
- }
73
- }
74
- /**
75
- * Check if the WebSocket is open and ready to send data.
76
- */
77
- get isOpen() {
78
- return this.socket.readyState === WS.WebSocket.OPEN;
79
- }
80
- /**
81
- * Wait for the connection to be established.
82
- */
83
- waitForOpen() {
84
- return new Promise((resolve, reject) => {
85
- if (this.socket.readyState === WS.WebSocket.OPEN) {
86
- resolve();
87
- return;
88
- }
89
- const onOpen = () => {
90
- this.socket.off('open', onOpen);
91
- this.socket.off('error', onError);
92
- resolve();
93
- };
94
- const onError = (err) => {
95
- this.socket.off('open', onOpen);
96
- this.socket.off('error', onError);
97
- reject(err);
98
- };
99
- this.socket.on('open', onOpen);
100
- this.socket.on('error', onError);
19
+ _createSocket(url, authHeaders) {
20
+ const ws = new WS.WebSocket(url, {
21
+ ...this._wsOptions,
22
+ headers: {
23
+ ...authHeaders,
24
+ ...this._wsOptions?.headers,
25
+ },
101
26
  });
102
- }
103
- authHeaders() {
104
- if (this.client.apiKey) {
105
- return { Authorization: `Bearer ${this.client.apiKey}` };
106
- }
107
- return {};
27
+ return new ws_adapter_node_1.NodeWebSocket(ws);
108
28
  }
109
29
  }
110
30
  exports.SpeechToTextWS = SpeechToTextWS;
@@ -1 +1 @@
1
- {"version":3,"file":"ws.js","sourceRoot":"","sources":["../../src/resources/speech-to-text/ws.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,+CAAyB;AACzB,sDAAgE;AAIhE,MAAa,cAAe,SAAQ,mCAAmB;IAKrD,YACE,MAAc,EACd,UAAoD,EACpD,OAA6C;QAE7C,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,GAAG,GAAG,IAAA,wBAAQ,EAAC,MAAM,EAAE,UAA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AAY,EAAE,CAAC,CAAC;QACvD,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,eAAe,EAAE,CAAC;IACzB,CAAC;IAES,aAAa,CAAC,GAAQ,EAAE,WAAmC;QACnE,MAAM,EAAE,GAAG,IAAI,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE;YAC/B,GAAG,IAAI,CAAC,UAAU;YAClB,OAAO,EAAE;gBACP,GAAG,WAAW;gBACd,GAAG,IAAI,CAAC,UAAU,EAAE,OAAO;aAC5B;SACF,CAAC,CAAC;QACH,OAAO,IAAI,+BAAa,CAAC,EAAE,CAAC,CAAC;IAC/B,CAAC;CACF;AA9BD,wCA8BC"}
@@ -1,106 +1,26 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
  import * as WS from 'ws';
3
- import { SpeechToTextEmitter, buildURL } from "./internal-base.mjs";
4
- export class SpeechToTextWS extends SpeechToTextEmitter {
3
+ import { NodeWebSocket } from "../../internal/ws-adapter-node.mjs";
4
+ import { SpeechToTextWSBase } from "./ws-base.mjs";
5
+ export class SpeechToTextWS extends SpeechToTextWSBase {
5
6
  constructor(client, parameters, options) {
6
- super();
7
- this.client = client;
8
- this.url = buildURL(client, parameters);
9
- this.socket = new WS.WebSocket(this.url, {
10
- ...options,
11
- headers: {
12
- ...this.authHeaders(),
13
- ...options?.headers,
14
- },
15
- });
16
- this.socket.on('open', () => {
17
- // Connection established, ready to send audio
18
- });
19
- this.socket.on('message', (wsEvent) => {
20
- const event = (() => {
21
- try {
22
- return JSON.parse(wsEvent.toString());
23
- }
24
- catch (err) {
25
- this._onError(null, 'could not parse websocket event', err);
26
- return null;
27
- }
28
- })();
29
- if (event) {
30
- this._emit('event', event);
31
- if (event.type === 'error') {
32
- this._onError(event);
33
- }
34
- else {
35
- // @ts-ignore TS isn't smart enough to get the relationship right here
36
- this._emit(event.type, event);
37
- }
38
- }
39
- });
40
- this.socket.on('error', (err) => {
41
- this._onError(null, err.message, err);
42
- });
43
- this.socket.on('close', (code, reason) => {
44
- // Connection closed
45
- });
46
- }
47
- /**
48
- * Send binary audio data to the server for transcription.
49
- * @param data - Raw audio bytes (mp3 or wav format)
50
- */
51
- send(data) {
52
- try {
53
- this.socket.send(data);
54
- }
55
- catch (err) {
56
- this._onError(null, 'could not send audio data', err);
7
+ if (!WS?.WebSocket) {
8
+ throw new Error('SpeechToTextWS from "telnyx/resources/speech-to-text/ws" requires the "ws" package but it could not be loaded.');
57
9
  }
10
+ const { reconnect, maxQueueSize, ...wsOptions } = options ?? {};
11
+ super(client, parameters, { reconnect, maxQueueSize });
12
+ this._wsOptions = wsOptions;
13
+ this._connectInitial();
58
14
  }
59
- /**
60
- * Close the WebSocket connection.
61
- */
62
- close(props) {
63
- try {
64
- this.socket.close(props?.code ?? 1000, props?.reason ?? 'OK');
65
- }
66
- catch (err) {
67
- this._onError(null, 'could not close the connection', err);
68
- }
69
- }
70
- /**
71
- * Check if the WebSocket is open and ready to send data.
72
- */
73
- get isOpen() {
74
- return this.socket.readyState === WS.WebSocket.OPEN;
75
- }
76
- /**
77
- * Wait for the connection to be established.
78
- */
79
- waitForOpen() {
80
- return new Promise((resolve, reject) => {
81
- if (this.socket.readyState === WS.WebSocket.OPEN) {
82
- resolve();
83
- return;
84
- }
85
- const onOpen = () => {
86
- this.socket.off('open', onOpen);
87
- this.socket.off('error', onError);
88
- resolve();
89
- };
90
- const onError = (err) => {
91
- this.socket.off('open', onOpen);
92
- this.socket.off('error', onError);
93
- reject(err);
94
- };
95
- this.socket.on('open', onOpen);
96
- this.socket.on('error', onError);
15
+ _createSocket(url, authHeaders) {
16
+ const ws = new WS.WebSocket(url, {
17
+ ...this._wsOptions,
18
+ headers: {
19
+ ...authHeaders,
20
+ ...this._wsOptions?.headers,
21
+ },
97
22
  });
98
- }
99
- authHeaders() {
100
- if (this.client.apiKey) {
101
- return { Authorization: `Bearer ${this.client.apiKey}` };
102
- }
103
- return {};
23
+ return new NodeWebSocket(ws);
104
24
  }
105
25
  }
106
26
  //# sourceMappingURL=ws.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ws.mjs","sourceRoot":"","sources":["../../src/resources/speech-to-text/ws.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,4BAAwB;AAIhE,MAAM,OAAO,cAAe,SAAQ,mBAAmB;IAKrD,YACE,MAAc,EACd,UAAoD,EACpD,OAA6C;QAE7C,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,GAAG,GAAG,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;QACxC,IAAI,CAAC,MAAM,GAAG,IAAI,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE;YACvC,GAAG,OAAO;YACV,OAAO,EAAE;gBACP,GAAG,IAAI,CAAC,WAAW,EAAE;gBACrB,GAAG,OAAO,EAAE,OAAO;aACpB;SACF,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE;YAC1B,8CAA8C;QAChD,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,EAAE;YACpC,MAAM,KAAK,GAAG,CAAC,GAAG,EAAE;gBAClB,IAAI,CAAC;oBACH,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAmC,CAAC;gBAC1E,CAAC;gBAAC,OAAO,GAAG,EAAE,CAAC;oBACb,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,iCAAiC,EAAE,GAAG,CAAC,CAAC;oBAC5D,OAAO,IAAI,CAAC;gBACd,CAAC;YACH,CAAC,CAAC,EAAE,CAAC;YAEL,IAAI,KAAK,EAAE,CAAC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","sourceRoot":"","sources":["../../src/resources/speech-to-text/ws.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,2CAAuC;AAC/D,OAAO,EAAE,kBAAkB,EAAkC,sBAAkB;AAO/E,MAAM,OAAO,cAAe,SAAQ,kBAAiC;IAGnE,YACE,MAAc,EACd,UAAgD,EAChD,OAAwD;QAExD,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,CAAC;YACnB,MAAM,IAAI,KAAK,CACb,gHAAgH,CACjH,CAAC;QACJ,CAAC;QAED,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,GAAG,SAAS,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;QAChE,KAAK,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC,CAAC;QACvD,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,eAAe,EAAE,CAAC;IACzB,CAAC;IAES,aAAa,CAAC,GAAQ,EAAE,WAAmC;QACnE,MAAM,EAAE,GAAG,IAAI,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE;YAC/B,GAAG,IAAI,CAAC,UAAU;YAClB,OAAO,EAAE;gBACP,GAAG,WAAW;gBACd,GAAG,IAAI,CAAC,UAAU,EAAE,OAAO;aAC5B;SACF,CAAC,CAAC;QACH,OAAO,IAAI,aAAa,CAAC,EAAE,CAAC,CAAC;IAC/B,CAAC;CACF"}
@@ -1,81 +1,2 @@
1
- import { APIResource } from "../core/resource.mjs";
2
- import { APIPromise } from "../core/api-promise.mjs";
3
- import { RequestOptions } from "../internal/request-options.mjs";
4
- /**
5
- * Discover available speech-to-text providers, models, and supported languages.
6
- */
7
- export declare class SpeechToText extends APIResource {
8
- /**
9
- * Retrieve the canonical list of supported speech-to-text providers, models,
10
- * accepted language codes, and the service types each model supports.
11
- *
12
- * Service types:
13
- *
14
- * - `streaming` — standalone WebSocket transcription via
15
- * `/speech-to-text/transcription`.
16
- * - `file_transcription` — file-based transcription via
17
- * `/ai/audio/transcriptions`.
18
- * - `in_call_transcription` — live call transcription via Call Control
19
- * `transcription_start`.
20
- *
21
- * Use this endpoint to discover which (provider, model) combinations are available
22
- * for the surface you need, and which language codes each accepts. `auto` in a
23
- * `languages` array indicates the provider performs language detection.
24
- */
25
- listProviders(query?: SpeechToTextListProvidersParams | null | undefined, options?: RequestOptions): APIPromise<SpeechToTextListProvidersResponse>;
26
- }
27
- /**
28
- * List of supported STT providers and models.
29
- */
30
- export interface SpeechToTextListProvidersResponse {
31
- data: Array<SpeechToTextListProvidersResponse.Data>;
32
- meta: SpeechToTextListProvidersResponse.Meta;
33
- }
34
- export declare namespace SpeechToTextListProvidersResponse {
35
- /**
36
- * A (provider, model) tuple along with its supported service types and languages.
37
- */
38
- interface Data {
39
- /**
40
- * Languages this (provider, model) accepts, in the provider's native code format.
41
- * `auto` indicates the provider performs language detection.
42
- */
43
- languages: Array<string>;
44
- /**
45
- * Provider-scoped model name.
46
- */
47
- model: string;
48
- /**
49
- * STT provider name.
50
- */
51
- provider: string;
52
- /**
53
- * Service surfaces this (provider, model) supports.
54
- */
55
- service_types: Array<'streaming' | 'file_transcription' | 'in_call_transcription'>;
56
- }
57
- interface Meta {
58
- /**
59
- * Total number of entries returned.
60
- */
61
- total: number;
62
- }
63
- }
64
- export interface SpeechToTextListProvidersParams {
65
- /**
66
- * Filter to entries for a specific STT provider. The enum mirrors the providers
67
- * advertised across the speech-to-text spec (including `google` and `telnyx`,
68
- * which are accepted as WebSocket transcription engines). A provider that has no
69
- * models currently registered for any service type will return an empty `data`
70
- * array rather than an error.
71
- */
72
- provider?: 'deepgram' | 'speechmatics' | 'assemblyai' | 'xai' | 'soniox' | 'azure' | 'openai' | 'google' | 'telnyx';
73
- /**
74
- * Filter to entries that support the given service type.
75
- */
76
- service_type?: 'streaming' | 'file_transcription' | 'in_call_transcription';
77
- }
78
- export declare namespace SpeechToText {
79
- export { type SpeechToTextListProvidersResponse as SpeechToTextListProvidersResponse, type SpeechToTextListProvidersParams as SpeechToTextListProvidersParams, };
80
- }
1
+ export * from "./speech-to-text/index.mjs";
81
2
  //# sourceMappingURL=speech-to-text.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"speech-to-text.d.mts","sourceRoot":"","sources":["../src/resources/speech-to-text.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAE7D;;GAEG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;;;;;OAgBG;IACH,aAAa,CACX,KAAK,GAAE,+BAA+B,GAAG,IAAI,GAAG,SAAc,EAC9D,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,iCAAiC,CAAC;CAOjD;AAED;;GAEG;AACH,MAAM,WAAW,iCAAiC;IAChD,IAAI,EAAE,KAAK,CAAC,iCAAiC,CAAC,IAAI,CAAC,CAAC;IAEpD,IAAI,EAAE,iCAAiC,CAAC,IAAI,CAAC;CAC9C;AAED,yBAAiB,iCAAiC,CAAC;IACjD;;OAEG;IACH,UAAiB,IAAI;QACnB;;;WAGG;QACH,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QAEzB;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QAEd;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB;;WAEG;QACH,aAAa,EAAE,KAAK,CAAC,WAAW,GAAG,oBAAoB,GAAG,uBAAuB,CAAC,CAAC;KACpF;IAED,UAAiB,IAAI;QACnB;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;KACf;CACF;AAED,MAAM,WAAW,+BAA+B;IAC9C;;;;;;OAMG;IACH,QAAQ,CAAC,EACL,UAAU,GACV,cAAc,GACd,YAAY,GACZ,KAAK,GACL,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,QAAQ,CAAC;IAEb;;OAEG;IACH,YAAY,CAAC,EAAE,WAAW,GAAG,oBAAoB,GAAG,uBAAuB,CAAC;CAC7E;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;CACH"}
1
+ {"version":3,"file":"speech-to-text.d.mts","sourceRoot":"","sources":["../src/resources/speech-to-text.ts"],"names":[],"mappings":"AAEA,2CAAuC"}
@@ -1,81 +1,2 @@
1
- import { APIResource } from "../core/resource.js";
2
- import { APIPromise } from "../core/api-promise.js";
3
- import { RequestOptions } from "../internal/request-options.js";
4
- /**
5
- * Discover available speech-to-text providers, models, and supported languages.
6
- */
7
- export declare class SpeechToText extends APIResource {
8
- /**
9
- * Retrieve the canonical list of supported speech-to-text providers, models,
10
- * accepted language codes, and the service types each model supports.
11
- *
12
- * Service types:
13
- *
14
- * - `streaming` — standalone WebSocket transcription via
15
- * `/speech-to-text/transcription`.
16
- * - `file_transcription` — file-based transcription via
17
- * `/ai/audio/transcriptions`.
18
- * - `in_call_transcription` — live call transcription via Call Control
19
- * `transcription_start`.
20
- *
21
- * Use this endpoint to discover which (provider, model) combinations are available
22
- * for the surface you need, and which language codes each accepts. `auto` in a
23
- * `languages` array indicates the provider performs language detection.
24
- */
25
- listProviders(query?: SpeechToTextListProvidersParams | null | undefined, options?: RequestOptions): APIPromise<SpeechToTextListProvidersResponse>;
26
- }
27
- /**
28
- * List of supported STT providers and models.
29
- */
30
- export interface SpeechToTextListProvidersResponse {
31
- data: Array<SpeechToTextListProvidersResponse.Data>;
32
- meta: SpeechToTextListProvidersResponse.Meta;
33
- }
34
- export declare namespace SpeechToTextListProvidersResponse {
35
- /**
36
- * A (provider, model) tuple along with its supported service types and languages.
37
- */
38
- interface Data {
39
- /**
40
- * Languages this (provider, model) accepts, in the provider's native code format.
41
- * `auto` indicates the provider performs language detection.
42
- */
43
- languages: Array<string>;
44
- /**
45
- * Provider-scoped model name.
46
- */
47
- model: string;
48
- /**
49
- * STT provider name.
50
- */
51
- provider: string;
52
- /**
53
- * Service surfaces this (provider, model) supports.
54
- */
55
- service_types: Array<'streaming' | 'file_transcription' | 'in_call_transcription'>;
56
- }
57
- interface Meta {
58
- /**
59
- * Total number of entries returned.
60
- */
61
- total: number;
62
- }
63
- }
64
- export interface SpeechToTextListProvidersParams {
65
- /**
66
- * Filter to entries for a specific STT provider. The enum mirrors the providers
67
- * advertised across the speech-to-text spec (including `google` and `telnyx`,
68
- * which are accepted as WebSocket transcription engines). A provider that has no
69
- * models currently registered for any service type will return an empty `data`
70
- * array rather than an error.
71
- */
72
- provider?: 'deepgram' | 'speechmatics' | 'assemblyai' | 'xai' | 'soniox' | 'azure' | 'openai' | 'google' | 'telnyx';
73
- /**
74
- * Filter to entries that support the given service type.
75
- */
76
- service_type?: 'streaming' | 'file_transcription' | 'in_call_transcription';
77
- }
78
- export declare namespace SpeechToText {
79
- export { type SpeechToTextListProvidersResponse as SpeechToTextListProvidersResponse, type SpeechToTextListProvidersParams as SpeechToTextListProvidersParams, };
80
- }
1
+ export * from "./speech-to-text/index.js";
81
2
  //# sourceMappingURL=speech-to-text.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"speech-to-text.d.ts","sourceRoot":"","sources":["../src/resources/speech-to-text.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D;;GAEG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;;;;;OAgBG;IACH,aAAa,CACX,KAAK,GAAE,+BAA+B,GAAG,IAAI,GAAG,SAAc,EAC9D,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,iCAAiC,CAAC;CAOjD;AAED;;GAEG;AACH,MAAM,WAAW,iCAAiC;IAChD,IAAI,EAAE,KAAK,CAAC,iCAAiC,CAAC,IAAI,CAAC,CAAC;IAEpD,IAAI,EAAE,iCAAiC,CAAC,IAAI,CAAC;CAC9C;AAED,yBAAiB,iCAAiC,CAAC;IACjD;;OAEG;IACH,UAAiB,IAAI;QACnB;;;WAGG;QACH,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QAEzB;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QAEd;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB;;WAEG;QACH,aAAa,EAAE,KAAK,CAAC,WAAW,GAAG,oBAAoB,GAAG,uBAAuB,CAAC,CAAC;KACpF;IAED,UAAiB,IAAI;QACnB;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;KACf;CACF;AAED,MAAM,WAAW,+BAA+B;IAC9C;;;;;;OAMG;IACH,QAAQ,CAAC,EACL,UAAU,GACV,cAAc,GACd,YAAY,GACZ,KAAK,GACL,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,QAAQ,CAAC;IAEb;;OAEG;IACH,YAAY,CAAC,EAAE,WAAW,GAAG,oBAAoB,GAAG,uBAAuB,CAAC;CAC7E;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;CACH"}
1
+ {"version":3,"file":"speech-to-text.d.ts","sourceRoot":"","sources":["../src/resources/speech-to-text.ts"],"names":[],"mappings":"AAEA,0CAAuC"}
@@ -1,36 +1,6 @@
1
1
  "use strict";
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.SpeechToText = void 0;
5
- const resource_1 = require("../core/resource.js");
6
- /**
7
- * Discover available speech-to-text providers, models, and supported languages.
8
- */
9
- class SpeechToText extends resource_1.APIResource {
10
- /**
11
- * Retrieve the canonical list of supported speech-to-text providers, models,
12
- * accepted language codes, and the service types each model supports.
13
- *
14
- * Service types:
15
- *
16
- * - `streaming` — standalone WebSocket transcription via
17
- * `/speech-to-text/transcription`.
18
- * - `file_transcription` — file-based transcription via
19
- * `/ai/audio/transcriptions`.
20
- * - `in_call_transcription` — live call transcription via Call Control
21
- * `transcription_start`.
22
- *
23
- * Use this endpoint to discover which (provider, model) combinations are available
24
- * for the surface you need, and which language codes each accepts. `auto` in a
25
- * `languages` array indicates the provider performs language detection.
26
- */
27
- listProviders(query = {}, options) {
28
- return this._client.get('/speech-to-text/providers', {
29
- query,
30
- defaultBaseURL: 'https://api.telnyx.com/v2',
31
- ...options,
32
- });
33
- }
34
- }
35
- exports.SpeechToText = SpeechToText;
4
+ const tslib_1 = require("../internal/tslib.js");
5
+ tslib_1.__exportStar(require("./speech-to-text/index.js"), exports);
36
6
  //# sourceMappingURL=speech-to-text.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"speech-to-text.js","sourceRoot":"","sources":["../src/resources/speech-to-text.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C;;GAEG;AACH,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;;;;;;;;;;;;;;;OAgBG;IACH,aAAa,CACX,QAA4D,EAAE,EAC9D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,2BAA2B,EAAE;YACnD,KAAK;YACL,cAAc,EAAE,2BAA2B;YAC3C,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AA5BD,oCA4BC"}
1
+ {"version":3,"file":"speech-to-text.js","sourceRoot":"","sources":["../src/resources/speech-to-text.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,oEAAuC"}
@@ -1,32 +1,3 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { APIResource } from "../core/resource.mjs";
3
- /**
4
- * Discover available speech-to-text providers, models, and supported languages.
5
- */
6
- export class SpeechToText extends APIResource {
7
- /**
8
- * Retrieve the canonical list of supported speech-to-text providers, models,
9
- * accepted language codes, and the service types each model supports.
10
- *
11
- * Service types:
12
- *
13
- * - `streaming` — standalone WebSocket transcription via
14
- * `/speech-to-text/transcription`.
15
- * - `file_transcription` — file-based transcription via
16
- * `/ai/audio/transcriptions`.
17
- * - `in_call_transcription` — live call transcription via Call Control
18
- * `transcription_start`.
19
- *
20
- * Use this endpoint to discover which (provider, model) combinations are available
21
- * for the surface you need, and which language codes each accepts. `auto` in a
22
- * `languages` array indicates the provider performs language detection.
23
- */
24
- listProviders(query = {}, options) {
25
- return this._client.get('/speech-to-text/providers', {
26
- query,
27
- defaultBaseURL: 'https://api.telnyx.com/v2',
28
- ...options,
29
- });
30
- }
31
- }
2
+ export * from "./speech-to-text/index.mjs";
32
3
  //# sourceMappingURL=speech-to-text.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"speech-to-text.mjs","sourceRoot":"","sources":["../src/resources/speech-to-text.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAI/C;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;;;;;OAgBG;IACH,aAAa,CACX,QAA4D,EAAE,EAC9D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,2BAA2B,EAAE;YACnD,KAAK;YACL,cAAc,EAAE,2BAA2B;YAC3C,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
1
+ {"version":3,"file":"speech-to-text.mjs","sourceRoot":"","sources":["../src/resources/speech-to-text.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,2CAAuC"}