You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're using the wavesurfer.js v6. library and its Microphone plugin for a vuejs project to record vocal recordings over tracks. We're using the Microphone plugin to create a voice recording while the playback of a track is playing, but the recorded audio is having issues recording clearly.
The issue we're having is that the playbacked track seems to be causing the microphone recording to cut out or sound muffled at certain points of the recording. Do you know if there is a fix for this issue?
There are two main components here MicWaveSurfer which records the vocals and DefaultWaveSurfer which plays the track. Each component has its own instance of Wavesurfer.
VocalUserInterface.vue//Parent of Playback component and Microphone component<template><divslot="expanded"><mic-wave-surfer
:audioUrl="selectedVocalBlobUrl"
@recording-finished="handleVocalRecordingFinished"
@audio-url="handleAudioUrl"ref="MicWaveSurfer"></mic-wave-surfer><default-wave-surferref="DefaultWaveSurfer"
:audioUrl="songOriginalTrack"></default-wave-surfer></div></template><script>
import MicWaveSurfer from "@/components/MicWaveSurfer";
import DefaultWaveSurfer from "@/components/DefaultWaveSurfer";
import {getFileBlob} from "@/utils";
export default {name: "VocalUserInterface",components: {MicWaveSurfer
DefaultWaveSurfer
},data: ()=>({songId: null,originalVocalBlobUrl: null,audioFileName: null,step: "starting",// Tracks state default = starting}),mounted(){this.songId=this.$route.params.songId;},
computed: {song(){returnthis.$store.getters["song/getSongById"](this.songId);},songOriginalTrack(){// We don't want the playback wavesurfer to show after the recording is finishedif(this.song&&this.song.mp3File&&this.step==="recording"){constpattern=/^((http|https|):\/\/)/;if(!pattern.test(this.song.mp3File)){returnprocess.env.VUE_APP_SONG_URL_PREFIX+this.song.mp3File;} else {returnthis.song.mp3File;}}else{returnnull;}},},methods: {reset(){Object.assign(this.$data,{originalVocalBlobUrl: null,selectedVocalBlobUrl: null,audioFileName: null,step: "starting",vocalLoader: null});},
startVocalRecording() {this.$refs.MicWaveSurfer.startRecording();this.$refs.DefaultWaveSurfer.play();},
stopVocalRecording() {this.$refs.MicWaveSurfer.stopRecording();this.$refs.DefaultWaveSurfer.stop();},
cancelVocalRecording() {this.$refs.MicWaveSurfer.cancelRecording();this.$refs.DefaultWaveSurfer.stop();},
uploadAudioFile() {// Upload .wav or recorded vocal to Storagethis.step="uploading";this.$refs.MicWaveSurfer.stop();getFileBlob(this.selectedVocalBlobUrl,blob=>{// Capture the uploadController so we can cancel the upload if neededthis.uploadController=Storage.uploadAudio(blob,this.vocalMetadata,this.audioFileName||`Recorded Vocal ${Math.floor(Math.random()*1000)}`,this.refreshListAndLaunchProcessing);// Kicks of tracking of vocalsthis.pendingFilename=this.uploadController.snapshot.ref.name;});},
// MicWaveSurfer Event Handlers
handleVocalRecordingFinished({url}) {this.originalVocalBlobUrl=url;this.selectedVocalBlobUrl=this.originalVocalBlobUrl;},
handleAudioUrl({url}) {// The audo file returned by the MicWaveSurfer after recording is donethis.originalBlobUrl=url;}}};</script><stylelang="scss"scoped></style>
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
We're using the wavesurfer.js v6. library and its Microphone plugin for a vuejs project to record vocal recordings over tracks. We're using the Microphone plugin to create a voice recording while the playback of a track is playing, but the recorded audio is having issues recording clearly.
The issue we're having is that the playbacked track seems to be causing the microphone recording to cut out or sound muffled at certain points of the recording. Do you know if there is a fix for this issue?
There are two main components here
MicWaveSurfer
which records the vocals andDefaultWaveSurfer
which plays the track. Each component has its own instance of Wavesurfer.Beta Was this translation helpful? Give feedback.
All reactions