mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-07 02:21:23 +00:00
Only use "magma" for spectrograms, not viridis
This commit is contained in:
1 parent
03740ed7ec
commit
17cd43b82a
2 files changed
+5
-5
No files matched your search
+3
-3
@@ -12,9 +12,9 @@ interface SpectrogramResponse {
|
||||
mel_scaled: Array<Array<number>>;
|
||||
}
|
||||
|
||||
const COLOR_MAP_PRESETS = [VIRIDIS, MAGMA];
|
||||
const COLOR_MAP_PRESETS = [MAGMA]; // [VIRIDIS, MAGMA]
|
||||
|
||||
function SpectrogramFc(props: Props) {
|
||||
function SpectrogramImage(props: Props) {
|
||||
const canvasRef = useRef(null);
|
||||
|
||||
let linearizeImage = (image: Array<Array<number>>): Uint8ClampedArray => {
|
||||
@@ -91,4 +91,4 @@ function SpectrogramFc(props: Props) {
|
||||
return <div className="py-6">{canvas}</div>;
|
||||
}
|
||||
|
||||
export { SpectrogramFc };
|
||||
export { SpectrogramImage };
|
||||
@@ -3,7 +3,7 @@ import { SessionWrapper } from "@storyteller/components/src/session/SessionWrapp
|
||||
import { Gravatar } from "@storyteller/components/src/elements/Gravatar";
|
||||
import { BucketConfig } from "@storyteller/components/src/api/BucketConfig";
|
||||
import { useParams, Link } from "react-router-dom";
|
||||
import { SpectrogramFc } from "./SpectrogramFc";
|
||||
import { SpectrogramImage } from "./SpectrogramImage";
|
||||
import { ReportDiscordLinkFc } from "../../_common/DiscordReportLinkFc";
|
||||
import { FrontendUrlConfig } from "../../../../common/FrontendUrlConfig";
|
||||
|
||||
@@ -328,7 +328,7 @@ function TtsResultViewPage(props: Props) {
|
||||
<motion.div className="container-panel pt-3 pb-5" variants={panel}>
|
||||
<div className="panel p-3 p-lg-4">
|
||||
<h2 className="panel-title fw-bold">Spectrogram</h2>
|
||||
<SpectrogramFc spectrogramJsonLink={spectrogramLink} />
|
||||
<SpectrogramImage spectrogramJsonLink={spectrogramLink} />
|
||||
</div>
|
||||
</motion.div>
|
||||
|
||||
|
||||
Reference in new issue
Block a user