Skip to content

Commit

Permalink
Merge branch 'farfromrefug-main'
Browse files Browse the repository at this point in the history
  • Loading branch information
jersou committed Oct 6, 2024
2 parents 54ab231 + 16d674b commit 5f25a03
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
34 changes: 17 additions & 17 deletions generate/basic_tts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,23 @@ export async function generate_audio_basic_tts(
) {
console.log(blue(`Generate basic TTS to ${outputPath}`));

if (
if (opt.useCoquiTts) {
const args = [
"--text",
title,
"--model_name",
opt.coquiTtsModel,
"--out_path",
convertPath(outputPath),
].concat(
opt.coquiTtsLanguageIdx
? ["--language_idx", opt.coquiTtsLanguageIdx]
: [],
).concat(
opt.coquiTtsSpeakerIdx ? ["--speaker_idx", opt.coquiTtsSpeakerIdx] : [],
);
await $`tts ${args}`;
} else if (
Deno.build.os === "windows" && (opt.skipWsl || !(await hasPico2waveWsl()))
) {
const audioFormat = "[System.Speech.AudioFormat.SpeechAudioFormatInfo]::" +
Expand All @@ -63,22 +79,6 @@ export async function generate_audio_basic_tts(
"LEF32@22050",
];
await $`say ${args}`.noThrow();
} else if (opt.useCoquiTts) {
const args = [
"--text",
title,
"--model_name",
opt.coquiTtsModel,
"--out_path",
convertPath(outputPath),
].concat(
opt.coquiTtsLanguageIdx
? ["--language_idx", opt.coquiTtsLanguageIdx]
: [],
).concat(
opt.coquiTtsSpeakerIdx ? ["--speaker_idx", opt.coquiTtsSpeakerIdx] : [],
);
await $`tts ${args}`;
} else {
const pico2waveCommand = await getPico2waveCommand();
const cmd = [
Expand Down
1 change: 1 addition & 0 deletions generate/rss_parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
import { join } from "@std/path";
import { blue, green } from "@std/fmt/colors";
import { exists } from "@std/fs";
import { parse } from "https://deno.land/x/[email protected]/mod.ts";
import i18next from "https://deno.land/x/[email protected]/index.js";
import type { File, Metadata } from "../serialize/serialize-types.ts";
import type { ModOptions } from "../types.ts";
Expand Down

0 comments on commit 5f25a03

Please sign in to comment.