phonic 0.1.0 → 0.1.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/dist/index.d.mts CHANGED
@@ -1,8 +1,7 @@
1
1
  import WebSocket from 'ws';
2
2
 
3
- type PhonicConfigBaseUrl = `http://${string}` | `https://${string}`;
4
3
  type PhonicConfig = {
5
- baseUrl?: PhonicConfigBaseUrl;
4
+ baseUrl?: string;
6
5
  };
7
6
  type FetchOptions = {
8
7
  method: "GET";
@@ -30,6 +29,12 @@ type PhonicWebSocketResponseMessage = {
30
29
  message: string;
31
30
  code?: string;
32
31
  };
32
+ paramErrors?: {
33
+ type?: string;
34
+ script?: string;
35
+ output_format?: string;
36
+ model_version?: string;
37
+ };
33
38
  };
34
39
  type OnMessageCallback = (data: PhonicWebSocketResponseMessage | Buffer) => void;
35
40
 
@@ -41,7 +46,7 @@ declare class PhonicWebSocket {
41
46
  private streamController;
42
47
  constructor(ws: WebSocket);
43
48
  onMessage(callback: OnMessageCallback): void;
44
- send(message: PhonicWebSocketMessage): ReadableStream<any>;
49
+ send(message: PhonicWebSocketMessage): ReadableStream<PhonicWebSocketResponseMessage | Buffer>;
45
50
  close(): void;
46
51
  }
47
52
 
@@ -88,4 +93,4 @@ declare class Phonic {
88
93
  }>;
89
94
  }
90
95
 
91
- export { Phonic };
96
+ export { Phonic, PhonicWebSocket };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,7 @@
1
1
  import WebSocket from 'ws';
2
2
 
3
- type PhonicConfigBaseUrl = `http://${string}` | `https://${string}`;
4
3
  type PhonicConfig = {
5
- baseUrl?: PhonicConfigBaseUrl;
4
+ baseUrl?: string;
6
5
  };
7
6
  type FetchOptions = {
8
7
  method: "GET";
@@ -30,6 +29,12 @@ type PhonicWebSocketResponseMessage = {
30
29
  message: string;
31
30
  code?: string;
32
31
  };
32
+ paramErrors?: {
33
+ type?: string;
34
+ script?: string;
35
+ output_format?: string;
36
+ model_version?: string;
37
+ };
33
38
  };
34
39
  type OnMessageCallback = (data: PhonicWebSocketResponseMessage | Buffer) => void;
35
40
 
@@ -41,7 +46,7 @@ declare class PhonicWebSocket {
41
46
  private streamController;
42
47
  constructor(ws: WebSocket);
43
48
  onMessage(callback: OnMessageCallback): void;
44
- send(message: PhonicWebSocketMessage): ReadableStream<any>;
49
+ send(message: PhonicWebSocketMessage): ReadableStream<PhonicWebSocketResponseMessage | Buffer>;
45
50
  close(): void;
46
51
  }
47
52
 
@@ -88,4 +93,4 @@ declare class Phonic {
88
93
  }>;
89
94
  }
90
95
 
91
- export { Phonic };
96
+ export { Phonic, PhonicWebSocket };
package/dist/index.js CHANGED
@@ -35,7 +35,7 @@ __export(src_exports, {
35
35
  module.exports = __toCommonJS(src_exports);
36
36
 
37
37
  // package.json
38
- var version = "0.1.0";
38
+ var version = "0.1.1";
39
39
 
40
40
  // src/tts/index.ts
41
41
  var import_ws = __toESM(require("ws"));
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "0.1.0";
2
+ var version = "0.1.1";
3
3
 
4
4
  // src/tts/index.ts
5
5
  import WebSocket from "ws";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phonic",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Phonic Node.js SDK",
5
5
  "scripts": {
6
6
  "build": "tsup",