@contractspec/integration.providers-impls 1.57.0 → 1.58.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.
- package/dist/analytics.d.ts +1 -8
- package/dist/analytics.d.ts.map +1 -1
- package/dist/analytics.js +3 -3
- package/dist/calendar.d.ts +1 -8
- package/dist/calendar.d.ts.map +1 -1
- package/dist/calendar.js +3 -3
- package/dist/database.d.ts +1 -8
- package/dist/database.d.ts.map +1 -1
- package/dist/database.js +3 -3
- package/dist/email.d.ts +1 -8
- package/dist/email.d.ts.map +1 -1
- package/dist/email.js +3 -3
- package/dist/embedding.d.ts +1 -8
- package/dist/embedding.d.ts.map +1 -1
- package/dist/embedding.js +3 -3
- package/dist/impls/elevenlabs-voice.d.ts +14 -18
- package/dist/impls/elevenlabs-voice.d.ts.map +1 -1
- package/dist/impls/elevenlabs-voice.js +98 -88
- package/dist/impls/fal-voice.d.ts +22 -26
- package/dist/impls/fal-voice.d.ts.map +1 -1
- package/dist/impls/fal-voice.js +103 -78
- package/dist/impls/fathom-meeting-recorder.d.ts +35 -39
- package/dist/impls/fathom-meeting-recorder.d.ts.map +1 -1
- package/dist/impls/fathom-meeting-recorder.js +285 -142
- package/dist/impls/fathom-meeting-recorder.mapper.d.ts +4 -8
- package/dist/impls/fathom-meeting-recorder.mapper.d.ts.map +1 -1
- package/dist/impls/fathom-meeting-recorder.mapper.js +102 -38
- package/dist/impls/fathom-meeting-recorder.types.d.ts +16 -20
- package/dist/impls/fathom-meeting-recorder.types.d.ts.map +1 -1
- package/dist/impls/fathom-meeting-recorder.types.js +1 -0
- package/dist/impls/fathom-meeting-recorder.utils.d.ts +10 -14
- package/dist/impls/fathom-meeting-recorder.utils.d.ts.map +1 -1
- package/dist/impls/fathom-meeting-recorder.utils.js +58 -41
- package/dist/impls/fathom-meeting-recorder.webhooks.d.ts +3 -7
- package/dist/impls/fathom-meeting-recorder.webhooks.d.ts.map +1 -1
- package/dist/impls/fathom-meeting-recorder.webhooks.js +25 -20
- package/dist/impls/fireflies-meeting-recorder.d.ts +21 -25
- package/dist/impls/fireflies-meeting-recorder.d.ts.map +1 -1
- package/dist/impls/fireflies-meeting-recorder.js +272 -149
- package/dist/impls/fireflies-meeting-recorder.queries.d.ts +3 -6
- package/dist/impls/fireflies-meeting-recorder.queries.d.ts.map +1 -1
- package/dist/impls/fireflies-meeting-recorder.queries.js +10 -8
- package/dist/impls/fireflies-meeting-recorder.types.d.ts +26 -29
- package/dist/impls/fireflies-meeting-recorder.types.d.ts.map +1 -1
- package/dist/impls/fireflies-meeting-recorder.types.js +1 -0
- package/dist/impls/fireflies-meeting-recorder.utils.d.ts +4 -7
- package/dist/impls/fireflies-meeting-recorder.utils.d.ts.map +1 -1
- package/dist/impls/fireflies-meeting-recorder.utils.js +34 -27
- package/dist/impls/gcs-storage.d.ts +18 -22
- package/dist/impls/gcs-storage.d.ts.map +1 -1
- package/dist/impls/gcs-storage.js +92 -84
- package/dist/impls/gmail-inbound.d.ts +20 -24
- package/dist/impls/gmail-inbound.d.ts.map +1 -1
- package/dist/impls/gmail-inbound.js +212 -185
- package/dist/impls/gmail-outbound.d.ts +12 -16
- package/dist/impls/gmail-outbound.d.ts.map +1 -1
- package/dist/impls/gmail-outbound.js +126 -92
- package/dist/impls/google-calendar.d.ts +17 -21
- package/dist/impls/google-calendar.d.ts.map +1 -1
- package/dist/impls/google-calendar.js +182 -145
- package/dist/impls/gradium-voice.d.ts +20 -22
- package/dist/impls/gradium-voice.d.ts.map +1 -1
- package/dist/impls/gradium-voice.js +85 -74
- package/dist/impls/granola-meeting-recorder.d.ts +31 -24
- package/dist/impls/granola-meeting-recorder.d.ts.map +1 -1
- package/dist/impls/granola-meeting-recorder.js +511 -143
- package/dist/impls/granola-meeting-recorder.mcp.d.ts +25 -0
- package/dist/impls/granola-meeting-recorder.mcp.d.ts.map +1 -0
- package/dist/impls/granola-meeting-recorder.mcp.js +279 -0
- package/dist/impls/granola-meeting-recorder.types.d.ts +60 -49
- package/dist/impls/granola-meeting-recorder.types.d.ts.map +1 -1
- package/dist/impls/granola-meeting-recorder.types.js +1 -0
- package/dist/impls/index.d.ts +28 -28
- package/dist/impls/index.d.ts.map +1 -0
- package/dist/impls/index.js +4659 -29
- package/dist/impls/jira.d.ts +18 -22
- package/dist/impls/jira.d.ts.map +1 -1
- package/dist/impls/jira.js +112 -101
- package/dist/impls/linear.d.ts +17 -21
- package/dist/impls/linear.d.ts.map +1 -1
- package/dist/impls/linear.js +78 -69
- package/dist/impls/mistral-embedding.d.ts +17 -21
- package/dist/impls/mistral-embedding.d.ts.map +1 -1
- package/dist/impls/mistral-embedding.js +41 -39
- package/dist/impls/mistral-llm.d.ts +25 -29
- package/dist/impls/mistral-llm.d.ts.map +1 -1
- package/dist/impls/mistral-llm.js +266 -244
- package/dist/impls/notion.d.ts +20 -24
- package/dist/impls/notion.d.ts.map +1 -1
- package/dist/impls/notion.js +145 -110
- package/dist/impls/posthog-reader.d.ts +18 -22
- package/dist/impls/posthog-reader.d.ts.map +1 -1
- package/dist/impls/posthog-reader.js +148 -129
- package/dist/impls/posthog-utils.d.ts +4 -7
- package/dist/impls/posthog-utils.d.ts.map +1 -1
- package/dist/impls/posthog-utils.js +31 -22
- package/dist/impls/posthog.d.ts +33 -37
- package/dist/impls/posthog.d.ts.map +1 -1
- package/dist/impls/posthog.js +320 -119
- package/dist/impls/postmark-email.d.ts +13 -17
- package/dist/impls/postmark-email.d.ts.map +1 -1
- package/dist/impls/postmark-email.js +55 -50
- package/dist/impls/powens-client.d.ts +111 -114
- package/dist/impls/powens-client.d.ts.map +1 -1
- package/dist/impls/powens-client.js +194 -170
- package/dist/impls/powens-openbanking.d.ts +22 -26
- package/dist/impls/powens-openbanking.d.ts.map +1 -1
- package/dist/impls/powens-openbanking.js +425 -217
- package/dist/impls/provider-factory.d.ts +29 -33
- package/dist/impls/provider-factory.d.ts.map +1 -1
- package/dist/impls/provider-factory.js +4072 -275
- package/dist/impls/qdrant-vector.d.ts +18 -22
- package/dist/impls/qdrant-vector.d.ts.map +1 -1
- package/dist/impls/qdrant-vector.js +76 -69
- package/dist/impls/stripe-payments.d.ts +22 -26
- package/dist/impls/stripe-payments.d.ts.map +1 -1
- package/dist/impls/stripe-payments.js +219 -193
- package/dist/impls/supabase-psql.d.ts +21 -25
- package/dist/impls/supabase-psql.d.ts.map +1 -1
- package/dist/impls/supabase-psql.js +138 -98
- package/dist/impls/supabase-vector.d.ts +29 -33
- package/dist/impls/supabase-vector.d.ts.map +1 -1
- package/dist/impls/supabase-vector.js +278 -103
- package/dist/impls/tldv-meeting-recorder.d.ts +18 -22
- package/dist/impls/tldv-meeting-recorder.d.ts.map +1 -1
- package/dist/impls/tldv-meeting-recorder.js +142 -127
- package/dist/impls/twilio-sms.d.ts +14 -17
- package/dist/impls/twilio-sms.d.ts.map +1 -1
- package/dist/impls/twilio-sms.js +62 -55
- package/dist/index.d.ts +15 -64
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4700 -107
- package/dist/llm.d.ts +1 -8
- package/dist/llm.d.ts.map +1 -1
- package/dist/llm.js +3 -3
- package/dist/meeting-recorder.d.ts +1 -8
- package/dist/meeting-recorder.d.ts.map +1 -1
- package/dist/meeting-recorder.js +3 -3
- package/dist/node/analytics.js +2 -0
- package/dist/node/calendar.js +2 -0
- package/dist/node/database.js +2 -0
- package/dist/node/email.js +2 -0
- package/dist/node/embedding.js +2 -0
- package/dist/node/impls/elevenlabs-voice.js +102 -0
- package/dist/node/impls/fal-voice.js +112 -0
- package/dist/node/impls/fathom-meeting-recorder.js +287 -0
- package/dist/node/impls/fathom-meeting-recorder.mapper.js +105 -0
- package/dist/node/impls/fathom-meeting-recorder.types.js +0 -0
- package/dist/node/impls/fathom-meeting-recorder.utils.js +72 -0
- package/dist/node/impls/fathom-meeting-recorder.webhooks.js +29 -0
- package/dist/node/impls/fireflies-meeting-recorder.js +274 -0
- package/dist/node/impls/fireflies-meeting-recorder.queries.js +85 -0
- package/dist/node/impls/fireflies-meeting-recorder.types.js +0 -0
- package/dist/node/impls/fireflies-meeting-recorder.utils.js +42 -0
- package/dist/node/impls/gcs-storage.js +97 -0
- package/dist/node/impls/gmail-inbound.js +227 -0
- package/dist/node/impls/gmail-outbound.js +139 -0
- package/dist/node/impls/google-calendar.js +191 -0
- package/dist/node/impls/gradium-voice.js +90 -0
- package/dist/node/impls/granola-meeting-recorder.js +512 -0
- package/dist/node/impls/granola-meeting-recorder.mcp.js +278 -0
- package/dist/node/impls/granola-meeting-recorder.types.js +0 -0
- package/dist/node/impls/index.js +4658 -0
- package/dist/node/impls/jira.js +124 -0
- package/dist/node/impls/linear.js +83 -0
- package/dist/node/impls/mistral-embedding.js +43 -0
- package/dist/node/impls/mistral-llm.js +269 -0
- package/dist/node/impls/notion.js +160 -0
- package/dist/node/impls/posthog-reader.js +159 -0
- package/dist/node/impls/posthog-utils.js +38 -0
- package/dist/node/impls/posthog.js +322 -0
- package/dist/node/impls/postmark-email.js +60 -0
- package/dist/node/impls/powens-client.js +195 -0
- package/dist/node/impls/powens-openbanking.js +426 -0
- package/dist/node/impls/provider-factory.js +4080 -0
- package/dist/node/impls/qdrant-vector.js +78 -0
- package/dist/node/impls/stripe-payments.js +228 -0
- package/dist/node/impls/supabase-psql.js +150 -0
- package/dist/node/impls/supabase-vector.js +323 -0
- package/dist/node/impls/tldv-meeting-recorder.js +145 -0
- package/dist/node/impls/twilio-sms.js +65 -0
- package/dist/node/index.js +4699 -0
- package/dist/node/llm.js +2 -0
- package/dist/node/meeting-recorder.js +2 -0
- package/dist/node/openbanking.js +2 -0
- package/dist/node/payments.js +2 -0
- package/dist/node/project-management.js +2 -0
- package/dist/node/runtime.js +0 -0
- package/dist/node/secrets/provider.js +11 -0
- package/dist/node/sms.js +2 -0
- package/dist/node/storage.js +2 -0
- package/dist/node/vector-store.js +2 -0
- package/dist/node/voice.js +2 -0
- package/dist/openbanking.d.ts +1 -8
- package/dist/openbanking.d.ts.map +1 -1
- package/dist/openbanking.js +3 -3
- package/dist/payments.d.ts +1 -8
- package/dist/payments.d.ts.map +1 -1
- package/dist/payments.js +3 -3
- package/dist/project-management.d.ts +1 -8
- package/dist/project-management.d.ts.map +1 -1
- package/dist/project-management.js +3 -3
- package/dist/runtime.d.ts +2 -2
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +1 -0
- package/dist/secrets/provider.d.ts +3 -2
- package/dist/secrets/provider.d.ts.map +1 -0
- package/dist/secrets/provider.js +12 -3
- package/dist/sms.d.ts +1 -8
- package/dist/sms.d.ts.map +1 -1
- package/dist/sms.js +3 -3
- package/dist/storage.d.ts +1 -8
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +3 -3
- package/dist/vector-store.d.ts +1 -8
- package/dist/vector-store.d.ts.map +1 -1
- package/dist/vector-store.js +3 -3
- package/dist/voice.d.ts +1 -8
- package/dist/voice.d.ts.map +1 -1
- package/dist/voice.js +3 -3
- package/package.json +405 -114
- package/dist/_virtual/_rolldown/runtime.js +0 -36
- package/dist/impls/elevenlabs-voice.js.map +0 -1
- package/dist/impls/fal-voice.js.map +0 -1
- package/dist/impls/fathom-meeting-recorder.js.map +0 -1
- package/dist/impls/fathom-meeting-recorder.mapper.js.map +0 -1
- package/dist/impls/fathom-meeting-recorder.utils.js.map +0 -1
- package/dist/impls/fathom-meeting-recorder.webhooks.js.map +0 -1
- package/dist/impls/fireflies-meeting-recorder.js.map +0 -1
- package/dist/impls/fireflies-meeting-recorder.queries.js.map +0 -1
- package/dist/impls/fireflies-meeting-recorder.utils.js.map +0 -1
- package/dist/impls/gcs-storage.js.map +0 -1
- package/dist/impls/gmail-inbound.js.map +0 -1
- package/dist/impls/gmail-outbound.js.map +0 -1
- package/dist/impls/google-calendar.js.map +0 -1
- package/dist/impls/gradium-voice.js.map +0 -1
- package/dist/impls/granola-meeting-recorder.js.map +0 -1
- package/dist/impls/jira.js.map +0 -1
- package/dist/impls/linear.js.map +0 -1
- package/dist/impls/mistral-embedding.js.map +0 -1
- package/dist/impls/mistral-llm.js.map +0 -1
- package/dist/impls/notion.js.map +0 -1
- package/dist/impls/posthog-reader.js.map +0 -1
- package/dist/impls/posthog-utils.js.map +0 -1
- package/dist/impls/posthog.js.map +0 -1
- package/dist/impls/postmark-email.js.map +0 -1
- package/dist/impls/powens-client.js.map +0 -1
- package/dist/impls/powens-openbanking.js.map +0 -1
- package/dist/impls/provider-factory.js.map +0 -1
- package/dist/impls/qdrant-vector.js.map +0 -1
- package/dist/impls/stripe-payments.js.map +0 -1
- package/dist/impls/supabase-psql.js.map +0 -1
- package/dist/impls/supabase-vector.js.map +0 -1
- package/dist/impls/tldv-meeting-recorder.js.map +0 -1
- package/dist/impls/twilio-sms.js.map +0 -1
- package/dist/index.js.map +0 -1
|
@@ -1,26 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
//#region src/impls/gradium-voice.d.ts
|
|
1
|
+
import { Gradium } from '@confiture-ai/gradium-sdk-js';
|
|
2
|
+
import type { Region, TTSOutputFormat } from '@confiture-ai/gradium-sdk-js';
|
|
3
|
+
import type { Voice, VoiceProvider, VoiceSynthesisInput, VoiceSynthesisResult } from '../voice';
|
|
5
4
|
type GradiumClient = Gradium;
|
|
6
|
-
interface GradiumVoiceProviderOptions {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
export interface GradiumVoiceProviderOptions {
|
|
6
|
+
apiKey: string;
|
|
7
|
+
defaultVoiceId?: string;
|
|
8
|
+
region?: Region;
|
|
9
|
+
baseUrl?: string;
|
|
10
|
+
timeoutMs?: number;
|
|
11
|
+
outputFormat?: TTSOutputFormat;
|
|
12
|
+
client?: GradiumClient;
|
|
14
13
|
}
|
|
15
|
-
declare class GradiumVoiceProvider implements
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
export declare class GradiumVoiceProvider implements VoiceProvider {
|
|
15
|
+
private readonly client;
|
|
16
|
+
private readonly defaultVoiceId?;
|
|
17
|
+
private readonly defaultOutputFormat?;
|
|
18
|
+
constructor(options: GradiumVoiceProviderOptions);
|
|
19
|
+
listVoices(): Promise<Voice[]>;
|
|
20
|
+
synthesize(input: VoiceSynthesisInput): Promise<VoiceSynthesisResult>;
|
|
21
|
+
private fromGradiumVoice;
|
|
23
22
|
}
|
|
24
|
-
|
|
25
|
-
export { GradiumVoiceProvider, GradiumVoiceProviderOptions };
|
|
23
|
+
export {};
|
|
26
24
|
//# sourceMappingURL=gradium-voice.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gradium-voice.d.ts","
|
|
1
|
+
{"version":3,"file":"gradium-voice.d.ts","sourceRoot":"","sources":["../../src/impls/gradium-voice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,KAAK,EACV,MAAM,EACN,eAAe,EAEhB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EACV,KAAK,EACL,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,UAAU,CAAC;AAElB,KAAK,aAAa,GAAG,OAAO,CAAC;AAY7B,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB;AAED,qBAAa,oBAAqB,YAAW,aAAa;IACxD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgB;IACvC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAS;IACzC,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAkB;gBAE3C,OAAO,EAAE,2BAA2B;IAa1C,UAAU,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;IAK9B,UAAU,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IA6B3E,OAAO,CAAC,gBAAgB;CAazB"}
|
|
@@ -1,80 +1,91 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// src/impls/gradium-voice.ts
|
|
1
3
|
import { Gradium } from "@confiture-ai/gradium-sdk-js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
ogg: "opus",
|
|
8
|
-
pcm: "pcm"
|
|
9
|
-
};
|
|
10
|
-
var GradiumVoiceProvider = class {
|
|
11
|
-
client;
|
|
12
|
-
defaultVoiceId;
|
|
13
|
-
defaultOutputFormat;
|
|
14
|
-
constructor(options) {
|
|
15
|
-
this.client = options.client ?? new Gradium({
|
|
16
|
-
apiKey: options.apiKey,
|
|
17
|
-
region: options.region,
|
|
18
|
-
baseURL: options.baseUrl,
|
|
19
|
-
timeout: options.timeoutMs
|
|
20
|
-
});
|
|
21
|
-
this.defaultVoiceId = options.defaultVoiceId;
|
|
22
|
-
this.defaultOutputFormat = options.outputFormat;
|
|
23
|
-
}
|
|
24
|
-
async listVoices() {
|
|
25
|
-
return (await this.client.voices.list({ include_catalog: true })).map((voice) => this.fromGradiumVoice(voice));
|
|
26
|
-
}
|
|
27
|
-
async synthesize(input) {
|
|
28
|
-
const voiceId = input.voiceId ?? this.defaultVoiceId;
|
|
29
|
-
if (!voiceId) throw new Error("Voice ID is required for Gradium synthesis.");
|
|
30
|
-
const outputFormat = (input.format ? FORMAT_MAP[input.format] : void 0) ?? this.defaultOutputFormat ?? "wav";
|
|
31
|
-
const response = await this.client.tts.create({
|
|
32
|
-
voice_id: voiceId,
|
|
33
|
-
output_format: outputFormat,
|
|
34
|
-
text: input.text
|
|
35
|
-
});
|
|
36
|
-
return {
|
|
37
|
-
audio: response.raw_data,
|
|
38
|
-
format: input.format ?? toContractFormat(outputFormat),
|
|
39
|
-
sampleRateHz: input.sampleRateHz ?? response.sample_rate ?? inferSampleRate(outputFormat),
|
|
40
|
-
durationSeconds: void 0,
|
|
41
|
-
url: void 0
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
fromGradiumVoice(voice) {
|
|
45
|
-
return {
|
|
46
|
-
id: voice.uid,
|
|
47
|
-
name: voice.name,
|
|
48
|
-
description: voice.description ?? void 0,
|
|
49
|
-
language: voice.language ?? void 0,
|
|
50
|
-
metadata: {
|
|
51
|
-
startSeconds: String(voice.start_s),
|
|
52
|
-
...voice.stop_s != null ? { stopSeconds: String(voice.stop_s) } : {},
|
|
53
|
-
filename: voice.filename
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
}
|
|
4
|
+
var FORMAT_MAP = {
|
|
5
|
+
mp3: "wav",
|
|
6
|
+
wav: "wav",
|
|
7
|
+
ogg: "opus",
|
|
8
|
+
pcm: "pcm"
|
|
57
9
|
};
|
|
10
|
+
|
|
11
|
+
class GradiumVoiceProvider {
|
|
12
|
+
client;
|
|
13
|
+
defaultVoiceId;
|
|
14
|
+
defaultOutputFormat;
|
|
15
|
+
constructor(options) {
|
|
16
|
+
this.client = options.client ?? new Gradium({
|
|
17
|
+
apiKey: options.apiKey,
|
|
18
|
+
region: options.region,
|
|
19
|
+
baseURL: options.baseUrl,
|
|
20
|
+
timeout: options.timeoutMs
|
|
21
|
+
});
|
|
22
|
+
this.defaultVoiceId = options.defaultVoiceId;
|
|
23
|
+
this.defaultOutputFormat = options.outputFormat;
|
|
24
|
+
}
|
|
25
|
+
async listVoices() {
|
|
26
|
+
const voices = await this.client.voices.list({ include_catalog: true });
|
|
27
|
+
return voices.map((voice) => this.fromGradiumVoice(voice));
|
|
28
|
+
}
|
|
29
|
+
async synthesize(input) {
|
|
30
|
+
const voiceId = input.voiceId ?? this.defaultVoiceId;
|
|
31
|
+
if (!voiceId) {
|
|
32
|
+
throw new Error("Voice ID is required for Gradium synthesis.");
|
|
33
|
+
}
|
|
34
|
+
const outputFormat = (input.format ? FORMAT_MAP[input.format] : undefined) ?? this.defaultOutputFormat ?? "wav";
|
|
35
|
+
const response = await this.client.tts.create({
|
|
36
|
+
voice_id: voiceId,
|
|
37
|
+
output_format: outputFormat,
|
|
38
|
+
text: input.text
|
|
39
|
+
});
|
|
40
|
+
return {
|
|
41
|
+
audio: response.raw_data,
|
|
42
|
+
format: input.format ?? toContractFormat(outputFormat),
|
|
43
|
+
sampleRateHz: input.sampleRateHz ?? response.sample_rate ?? inferSampleRate(outputFormat),
|
|
44
|
+
durationSeconds: undefined,
|
|
45
|
+
url: undefined
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
fromGradiumVoice(voice) {
|
|
49
|
+
return {
|
|
50
|
+
id: voice.uid,
|
|
51
|
+
name: voice.name,
|
|
52
|
+
description: voice.description ?? undefined,
|
|
53
|
+
language: voice.language ?? undefined,
|
|
54
|
+
metadata: {
|
|
55
|
+
startSeconds: String(voice.start_s),
|
|
56
|
+
...voice.stop_s != null ? { stopSeconds: String(voice.stop_s) } : {},
|
|
57
|
+
filename: voice.filename
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
}
|
|
58
62
|
function toContractFormat(format) {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
switch (format) {
|
|
64
|
+
case "opus":
|
|
65
|
+
return "ogg";
|
|
66
|
+
case "wav":
|
|
67
|
+
return "wav";
|
|
68
|
+
case "pcm":
|
|
69
|
+
case "pcm_16000":
|
|
70
|
+
case "pcm_24000":
|
|
71
|
+
return "pcm";
|
|
72
|
+
default:
|
|
73
|
+
return format;
|
|
74
|
+
}
|
|
67
75
|
}
|
|
68
76
|
function inferSampleRate(format) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
77
|
+
switch (format) {
|
|
78
|
+
case "ulaw_8000":
|
|
79
|
+
case "alaw_8000":
|
|
80
|
+
return 8000;
|
|
81
|
+
case "pcm_16000":
|
|
82
|
+
return 16000;
|
|
83
|
+
case "pcm_24000":
|
|
84
|
+
return 24000;
|
|
85
|
+
default:
|
|
86
|
+
return 48000;
|
|
87
|
+
}
|
|
76
88
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
//# sourceMappingURL=gradium-voice.js.map
|
|
89
|
+
export {
|
|
90
|
+
GradiumVoiceProvider
|
|
91
|
+
};
|
|
@@ -1,27 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import type { MeetingRecord, MeetingRecorderGetMeetingParams, MeetingRecorderGetTranscriptParams, MeetingRecorderListMeetingsParams, MeetingRecorderListMeetingsResult, MeetingRecorderProvider, MeetingTranscriptRecord } from '../meeting-recorder';
|
|
2
|
+
import type { GranolaMeetingRecorderTransport } from './granola-meeting-recorder.types';
|
|
3
|
+
export interface GranolaMeetingRecorderProviderOptions {
|
|
4
|
+
apiKey?: string;
|
|
5
|
+
baseUrl?: string;
|
|
6
|
+
pageSize?: number;
|
|
7
|
+
transport?: GranolaMeetingRecorderTransport;
|
|
8
|
+
mcpUrl?: string;
|
|
9
|
+
mcpAccessToken?: string;
|
|
10
|
+
mcpHeaders?: Record<string, string>;
|
|
11
|
+
fetchFn?: typeof fetch;
|
|
8
12
|
}
|
|
9
|
-
declare class GranolaMeetingRecorderProvider implements
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
13
|
+
export declare class GranolaMeetingRecorderProvider implements MeetingRecorderProvider {
|
|
14
|
+
private readonly apiKey?;
|
|
15
|
+
private readonly baseUrl;
|
|
16
|
+
private readonly defaultPageSize?;
|
|
17
|
+
private readonly transport;
|
|
18
|
+
private readonly mcpClient;
|
|
19
|
+
constructor(options: GranolaMeetingRecorderProviderOptions);
|
|
20
|
+
listMeetings(params: MeetingRecorderListMeetingsParams): Promise<MeetingRecorderListMeetingsResult>;
|
|
21
|
+
getMeeting(params: MeetingRecorderGetMeetingParams): Promise<MeetingRecord>;
|
|
22
|
+
getTranscript(params: MeetingRecorderGetTranscriptParams): Promise<MeetingTranscriptRecord>;
|
|
23
|
+
private listMeetingsViaMcp;
|
|
24
|
+
private getMeetingViaMcp;
|
|
25
|
+
private getTranscriptViaMcp;
|
|
26
|
+
private getNote;
|
|
27
|
+
private mapNoteSummary;
|
|
28
|
+
private mapNoteDetail;
|
|
29
|
+
private mapTranscriptSegments;
|
|
30
|
+
private mapUser;
|
|
31
|
+
private mapInvitee;
|
|
32
|
+
private request;
|
|
24
33
|
}
|
|
25
|
-
//#endregion
|
|
26
|
-
export { GranolaMeetingRecorderProvider, GranolaMeetingRecorderProviderOptions };
|
|
27
34
|
//# sourceMappingURL=granola-meeting-recorder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"granola-meeting-recorder.d.ts","
|
|
1
|
+
{"version":3,"file":"granola-meeting-recorder.d.ts","sourceRoot":"","sources":["../../src/impls/granola-meeting-recorder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,aAAa,EACb,+BAA+B,EAC/B,kCAAkC,EAClC,iCAAiC,EACjC,iCAAiC,EACjC,uBAAuB,EACvB,uBAAuB,EAExB,MAAM,qBAAqB,CAAC;AAO7B,OAAO,KAAK,EAGV,+BAA+B,EAKhC,MAAM,kCAAkC,CAAC;AAE1C,MAAM,WAAW,qCAAqC;IACpD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,+BAA+B,CAAC;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,OAAO,CAAC,EAAE,OAAO,KAAK,CAAC;CACxB;AAMD,qBAAa,8BAA+B,YAAW,uBAAuB;IAC5E,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAS;IAC1C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAkC;IAC5D,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAmB;gBAEjC,OAAO,EAAE,qCAAqC;IAapD,YAAY,CAChB,MAAM,EAAE,iCAAiC,GACxC,OAAO,CAAC,iCAAiC,CAAC;IAwBvC,UAAU,CACd,MAAM,EAAE,+BAA+B,GACtC,OAAO,CAAC,aAAa,CAAC;IAUnB,aAAa,CACjB,MAAM,EAAE,kCAAkC,GACzC,OAAO,CAAC,uBAAuB,CAAC;YAwBrB,kBAAkB;YAyBlB,gBAAgB;YAyBhB,mBAAmB;YA4BnB,OAAO;IAKrB,OAAO,CAAC,cAAc;IAqBtB,OAAO,CAAC,aAAa;IA2CrB,OAAO,CAAC,qBAAqB;IAa7B,OAAO,CAAC,OAAO;IASf,OAAO,CAAC,UAAU;YAOJ,OAAO;CAiBtB"}
|