Spectrgram does not set to specified height. Also, the quality of spectrogram is poor #3822
Unanswered
puneet-yadav
asked this question in
Q&A
Replies: 2 comments 7 replies
-
@pengzhendong any ideas? |
Beta Was this translation helpful? Give feedback.
2 replies
-
@puneet-yadav Could you provide the wave file? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
`import React, { useEffect, useRef } from "react";
import WaveSurfer from "wavesurfer.js";
import Spectrogram from "wavesurfer.js/dist/plugins/spectrogram.esm.js";
const Waveform = () => {
const waveformRef = useRef(null);
useEffect(() => {
const ws = WaveSurfer.create({
container: waveformRef.current,
waveColor: "rgb(200, 0, 200)",
barHeight: 20,
progressColor: "rgb(100, 0, 100)",
url: "/recording.wav",
sampleRate: 40000,
});
}, []);
return
};
export default Waveform;
`
Above is my code for the spectrgram. I am using "wavesurfer.js": "^7.8.3" in my react application. The spectrgram does not change height to the specified height in the options. It worked before now suddenly it stopped scaling to the specified height. Also, when I change the maxFrequency to 3000 HZ the spectrogram becomes blurry and not crisp and clear.
Below is the screenshot
Beta Was this translation helpful? Give feedback.
All reactions