Close #5
This commit is contained in:
@@ -7,7 +7,7 @@ import { config } from "./config.js";
|
||||
* Split text into natural chunks for TTS processing
|
||||
* Aims for approximately 50 characters per chunk, breaking at natural points
|
||||
*/
|
||||
function splitTextIntoChunks(text: string, maxLength: number = 50): string[] {
|
||||
function splitTextIntoChunks(text: string, maxLength = 50): string[] {
|
||||
if (text.length <= maxLength) {
|
||||
return [text];
|
||||
}
|
||||
@@ -242,7 +242,7 @@ async function concatenateAudioFiles(
|
||||
export async function generateTTSWithoutQueue(
|
||||
itemId: string,
|
||||
scriptText: string,
|
||||
retryCount: number = 0,
|
||||
retryCount = 0,
|
||||
): Promise<string> {
|
||||
if (!itemId || itemId.trim() === "") {
|
||||
throw new Error("Item ID is required for TTS generation");
|
||||
@@ -337,7 +337,7 @@ export async function generateTTSWithoutQueue(
|
||||
export async function generateTTS(
|
||||
itemId: string,
|
||||
scriptText: string,
|
||||
retryCount: number = 0,
|
||||
retryCount = 0,
|
||||
): Promise<string> {
|
||||
const maxRetries = 2;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user