mulmocast 2.1.6 → 2.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/actions/audio.js +9 -1
- package/lib/utils/filters.js +3 -1
- package/package.json +1 -1
package/lib/actions/audio.js
CHANGED
|
@@ -30,7 +30,15 @@ const getAudioPathOrUrl = (context, beat, maybeAudioFile) => {
|
|
|
30
30
|
export const getBeatAudioPathOrUrl = (text, context, beat, lang) => {
|
|
31
31
|
const audioDirPath = MulmoStudioContextMethods.getAudioDirPath(context);
|
|
32
32
|
const { voiceId, provider, speechOptions, model } = MulmoStudioContextMethods.getAudioParam(context, beat, lang);
|
|
33
|
-
const hash_string = [
|
|
33
|
+
const hash_string = [
|
|
34
|
+
text,
|
|
35
|
+
voiceId,
|
|
36
|
+
speechOptions?.instruction ?? "",
|
|
37
|
+
speechOptions?.speed ?? 1.0,
|
|
38
|
+
provider,
|
|
39
|
+
model ?? "",
|
|
40
|
+
speechOptions?.decoration ?? "",
|
|
41
|
+
].join(":");
|
|
34
42
|
GraphAILogger.log(`getBeatAudioPathOrUrl [${hash_string}]`);
|
|
35
43
|
const audioFileName = `${context.studio.filename}_${text2hash(hash_string)}`;
|
|
36
44
|
const maybeAudioFile = getAudioFilePath(audioDirPath, context.studio.filename, audioFileName, lang);
|
package/lib/utils/filters.js
CHANGED
|
@@ -17,10 +17,12 @@ export const nijovoiceTextAgentFilter = async (context, next) => {
|
|
|
17
17
|
};
|
|
18
18
|
export const fileCacheAgentFilter = async (context, next) => {
|
|
19
19
|
const { force, file, index, mulmoContext, sessionType, id, withBackup } = context.namedInputs.cache;
|
|
20
|
+
/*
|
|
20
21
|
const fileName = path.resolve(path.dirname(file), id + ".mp3");
|
|
21
22
|
if (fs.existsSync(file)) {
|
|
22
|
-
|
|
23
|
+
fs.copyFileSync(file, fileName);
|
|
23
24
|
}
|
|
25
|
+
*/
|
|
24
26
|
const shouldUseCache = async () => {
|
|
25
27
|
if (force && force.some((element) => element)) {
|
|
26
28
|
return false;
|