-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove reliance on Node libraries for browser compatibility (#44)
- Loading branch information
Showing
7 changed files
with
22 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
import type { Buffer } from 'node:buffer'; | ||
|
||
/** | ||
* @param text The text to send to the aeiou Dectalk API | ||
* @returns A buffer containing wav-encoded binary output | ||
* @returns An array buffer containing wav-encoded binary output | ||
* @throws If `text` is empty or only whitespace | ||
* @throws If the API returns a non-200 response | ||
*/ | ||
export = async function dectalk(input: string): Promise<Buffer> { | ||
const dectalkESM = (await import('./index.js')).default; | ||
return await dectalkESM(input); | ||
export = async function dectalk(input: string): Promise<ArrayBuffer> { | ||
const dectalk = (await import('./index.js')).default; | ||
return await dectalk(input); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters