code refactor
This commit is contained in:
@@ -32,7 +32,6 @@ function PreviewPage() {
|
||||
|
||||
return (
|
||||
<Container maxWidth="md" sx={{ py: 4 }}>
|
||||
<p>Audio Classification: {audioClass || "No data received"}</p>
|
||||
<StepperComponent activeStep={1} />
|
||||
|
||||
<Paper elevation={3} sx={{ p: 4, mt: 4 }}>
|
||||
@@ -92,6 +91,7 @@ function PreviewPage() {
|
||||
controls
|
||||
/>
|
||||
</Box>
|
||||
<p>Audio Classification: {audioClass || "No data received"}</p>
|
||||
</Box>
|
||||
) : (
|
||||
<Typography color="error" sx={{ mt: 2 }}>
|
||||
|
||||
@@ -51,7 +51,7 @@ function ProcessingPage() {
|
||||
processStep("/api/trim", () => {
|
||||
if (response.audio_class === "Music") {
|
||||
processStep("/api/resample", () => {
|
||||
processStep("/api/separate", () => setProgress(100), 100, "Separating sources into vocals, bass, drums and other...");
|
||||
processStep("/api/separate", () => setProgress(100), 100, "Separating music into vocals, bass, drums and other...");
|
||||
}, 75, "Resampling audio to 44100Hz...", { sr: "44100" });
|
||||
} else {
|
||||
processStep("/api/noisereduce", () => setProgress(100), 100, "Reducing background noise from the audio...");
|
||||
|
||||
Reference in New Issue
Block a user