Skip to content

Commit

Permalink
Linted
Browse files Browse the repository at this point in the history
  • Loading branch information
eyw520 committed Nov 29, 2024
1 parent 22c9758 commit 25fe12d
Show file tree
Hide file tree
Showing 6 changed files with 414 additions and 484 deletions.
19 changes: 8 additions & 11 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
/** @type {import('jest').Config} */
module.exports = {
preset: 'ts-jest/presets/default-esm',
testEnvironment: 'node',
extensionsToTreatAsEsm: ['.ts'],
preset: "ts-jest/presets/default-esm",
testEnvironment: "node",
extensionsToTreatAsEsm: [".ts"],
globals: {
'ts-jest': {
useESM: true,
},
"ts-jest": {
useESM: true,
},
},
transformIgnorePatterns: [
'/node_modules/(?!(emittery)/)',
],
};

transformIgnorePatterns: ["/node_modules/(?!(emittery)/)"],
};
1 change: 0 additions & 1 deletion src/wrapper/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { CartesiaClient as FernCartesiaClient } from "../Client";
import { StreamingTTSClient } from "./StreamingTTSClient";

export class CartesiaClient extends FernCartesiaClient {

protected _tts: StreamingTTSClient | undefined;

public get tts(): StreamingTTSClient {
Expand Down
13 changes: 8 additions & 5 deletions src/wrapper/StreamingTTSClient.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
import { Tts } from "../api/resources/tts/client/Client";
import Websocket from "./Websocket";


export class StreamingTTSClient extends Tts {
constructor(options: Tts.Options = {}) {
super(options);
}

/**
* Get a WebSocket client for streaming TTS.
*
*
* @param options - Options for the WebSocket client.
* @returns A WebSocket client configured for streaming TTS.
*/
websocket({ sampleRate, container, encoding }: {
websocket({
sampleRate,
container,
encoding,
}: {
sampleRate: number;
container?: string;
encoding?: string
encoding?: string;
}): Websocket {
return new Websocket({ sampleRate, container, encoding }, {cartesiaVersion: "2024-06-10", ...this._options});
return new Websocket({ sampleRate, container, encoding }, { cartesiaVersion: "2024-06-10", ...this._options });
}
}
Loading

0 comments on commit 25fe12d

Please sign in to comment.