diff --git a/package.json b/package.json index 103891a..0c96b7c 100644 --- a/package.json +++ b/package.json @@ -3,11 +3,11 @@ "version": "1.0.1", "description": "API wrapper for the Dectalk TTS system", "keywords": [ - "dectalk", - "tts", "api", "text-to-speech", - "wav" + "tts", + "wav", + "dectalk" ], "homepage": "https://github.com/JstnMcBrd/dectalk-tts", "bugs": "https://github.com/JstnMcBrd/dectalk-tts/issues", diff --git a/src/index.ts b/src/index.ts index 56accb1..912882e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,5 @@ import { Buffer } from 'node:buffer'; -import { URL, URLSearchParams } from 'node:url'; +import { URL } from 'node:url'; /** * @param text The text to send to the aeiou Dectalk API @@ -16,7 +16,7 @@ export default async function dectalk(text: string): Promise { // Format request URL const url = new URL('https://tts.cyzon.us/tts'); - url.search = new URLSearchParams({ text }).toString(); + url.searchParams.append('text', text); // Send request const response = await fetch(url);