-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: updzate GUI with cache options
- Loading branch information
Showing
8 changed files
with
104 additions
and
68 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// shared types with the GUI | ||
|
||
export const OPEN_AI_VOICES = [ | ||
"alloy", | ||
"echo", | ||
"fable", | ||
"onyx", | ||
"nova", | ||
"shimmer", | ||
] as const; | ||
export const OPEN_AI_MODELS = ["tts-1", "tts-1-hd"] as const; | ||
|
||
export type CliOptions = { | ||
storyPath: string; | ||
lang: string; | ||
rssSplitLength: number; | ||
rssSplitSeasons?: boolean; | ||
rssMinDuration: number; | ||
rssUseImageAsThumbnail?: boolean; | ||
rssUseSubtitleAsTitle?: boolean; | ||
skipImageItemGen?: boolean; | ||
thumbnailFromFirstItem: boolean; | ||
useThumbnailAsRootImage?: boolean; | ||
imageItemGenFont: string; | ||
skipAudioItemGen?: boolean; | ||
skipAudioConvert?: boolean; | ||
skipImageConvert?: boolean; | ||
skipExtractImageFromMp3?: boolean; | ||
skipZipGeneration?: boolean; | ||
skipNotRss?: boolean; | ||
autoNextStoryTransition?: boolean; | ||
selectNextStoryAtEnd?: boolean; | ||
addDelay?: boolean; | ||
nightMode?: boolean; | ||
seekStory?: string; | ||
skipWsl?: boolean; | ||
skipRssImageDl?: boolean; | ||
outputFolder?: string; | ||
useOpenAiTts?: boolean; | ||
openAiApiKey?: string; | ||
openAiModel?: typeof OPEN_AI_MODELS[number]; | ||
openAiVoice?: typeof OPEN_AI_VOICES[number]; | ||
useCoquiTts?: boolean; | ||
coquiTtsModel?: string; | ||
coquiTtsLanguageIdx?: string; | ||
coquiTtsSpeakerIdx?: string; | ||
extract?: boolean; | ||
server?: boolean; | ||
port?: number; | ||
configFile?: string; | ||
isCompiled?: boolean; | ||
gui?: boolean; | ||
skipWriteTtsCache?: boolean; | ||
skipReadTtsCache?: boolean; | ||
ttsCachePath?: string; | ||
customScript?: string; | ||
}; |
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
Large diffs are not rendered by default.
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
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,62 +1,11 @@ | ||
import type { RssItem } from "./generate/rss_parser.ts"; | ||
|
||
export const OPEN_AI_VOICES = [ | ||
"alloy", | ||
"echo", | ||
"fable", | ||
"onyx", | ||
"nova", | ||
"shimmer", | ||
] as const; | ||
export const OPEN_AI_MODELS = ["tts-1", "tts-1-hd"] as const; | ||
import type { CliOptions } from "./common-types.ts"; | ||
|
||
export interface CustomModule { | ||
fetchRssItemImage?: (item: RssItem, opt: ModOptions) => Promise<string>; | ||
} | ||
export type ModOptions = { | ||
storyPath: string; | ||
lang: string; | ||
rssSplitLength: number; | ||
rssSplitSeasons?: boolean; | ||
rssMinDuration: number; | ||
rssUseImageAsThumbnail?: boolean; | ||
rssUseSubtitleAsTitle?: boolean; | ||
skipImageItemGen?: boolean; | ||
thumbnailFromFirstItem: boolean; | ||
useThumbnailAsRootImage?: boolean; | ||
imageItemGenFont: string; | ||
skipAudioItemGen?: boolean; | ||
skipAudioConvert?: boolean; | ||
skipImageConvert?: boolean; | ||
skipExtractImageFromMp3?: boolean; | ||
skipZipGeneration?: boolean; | ||
skipNotRss?: boolean; | ||
autoNextStoryTransition?: boolean; | ||
selectNextStoryAtEnd?: boolean; | ||
addDelay?: boolean; | ||
nightMode?: boolean; | ||
seekStory?: string; | ||
skipWsl?: boolean; | ||
skipRssImageDl?: boolean; | ||
outputFolder?: string; | ||
useOpenAiTts?: boolean; | ||
openAiApiKey?: string; | ||
openAiModel?: typeof OPEN_AI_MODELS[number]; | ||
openAiVoice?: typeof OPEN_AI_VOICES[number]; | ||
useCoquiTts?: boolean; | ||
coquiTtsModel?: string; | ||
coquiTtsLanguageIdx?: string; | ||
coquiTtsSpeakerIdx?: string; | ||
extract?: boolean; | ||
server?: boolean; | ||
port?: number; | ||
configFile?: string; | ||
isCompiled?: boolean; | ||
gui?: boolean; | ||
skipWriteTtsCache?: boolean; | ||
skipReadTtsCache?: boolean; | ||
ttsCachePath?: string; | ||
customScript?: string; | ||
|
||
export type ModOptions = CliOptions & { | ||
customModule?: CustomModule; | ||
i18n?: Record<string, string>; | ||
}; |
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