diff --git a/packages/api/src/textToSpeech.d.ts b/packages/api/src/textToSpeech.d.ts deleted file mode 100644 index 7cf74d63b..000000000 --- a/packages/api/src/textToSpeech.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -declare module '@omnivore/text-to-speech-handler' { - export function htmlToSpeechFile(htmlInput: HtmlInput): SpeechFile - - export interface HtmlInput { - title?: string - content: string - options: SSMLOptions - } - - export interface SSMLOptions { - primaryVoice?: string - secondaryVoice?: string - rate?: string - language?: string - } - - interface Utterance { - idx: string - wordOffset: number - wordCount: number - voice?: string - text: string - } - - export interface SpeechFile { - wordCount: number - language: string - defaultVoice: string - utterances: Utterance[] - } -} diff --git a/packages/text-to-speech/package.json b/packages/text-to-speech/package.json index 8d9bf3306..e326eb8f9 100644 --- a/packages/text-to-speech/package.json +++ b/packages/text-to-speech/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "description": "", "main": "build/src/index.js", - "types": "build/src/index.d.ts", + "types": "build/src/htmlToSsml.d.ts", "files": [ "build/src" ], diff --git a/packages/text-to-speech/src/index.ts b/packages/text-to-speech/src/index.ts index d38adbf8b..5c4902fdf 100644 --- a/packages/text-to-speech/src/index.ts +++ b/packages/text-to-speech/src/index.ts @@ -13,7 +13,7 @@ import { TextToSpeechInput, } from './textToSpeech' import { File, Storage } from '@google-cloud/storage' -import { endSsml, htmlToSpeechFile, startSsml } from './htmlToSsml' +import { endSsml, startSsml } from './htmlToSsml' import crypto from 'crypto' import { createRedisClient } from './redis' @@ -236,9 +236,3 @@ export const textToSpeechStreamingHandler = Sentry.GCPFunction.wrapHttpFunction( } } ) - -module.exports = { - htmlToSpeechFile, - textToSpeechStreamingHandler, - textToSpeechHandler, -} diff --git a/packages/text-to-speech/tsconfig.json b/packages/text-to-speech/tsconfig.json index f450acf38..c980a6b1f 100644 --- a/packages/text-to-speech/tsconfig.json +++ b/packages/text-to-speech/tsconfig.json @@ -3,7 +3,9 @@ "compilerOptions": { "outDir": "build", "rootDir": ".", - "lib": ["dom"] + "lib": ["dom"], + // Generate d.ts files + "declaration": true }, - "include": ["src", "test"] + "include": ["src", "test"], }