hello everyone, I'm new in the forum and I'm creating an app to create songs by adding a recorded voice to the karaoke song. I have already set up the SoundRecorder and the Player, but I don't know how to save the track on the device with the karaoke song combined with the recorded voice. I had read about a plugin to export files to the SD but I am interested in the internal memory, also because on the SD most of the times the permission to save in the most recent devices is denied. how can I do? Thanks in advance.
Welcome to the forum Jacopo.
My understanding is creating songs by adding a recorded voice to the karaoke song might not be possible using App Inventor Jacopo. Why? Because to do this you either have to
- record the voice sound with the karaoke in the background and save the file. The Player and SoundRecorder can not be used simultaneously as far as I can tell.
- make a separate recorded voice file (using the SoundRecorder) and merge the sound file with the karoke song). There is no extension that allows merging of and manipulation of audio files this way.
My guess is it is impossible to either merge a recorded voice with a music file or to play the music file and record the voice at the same time.
Someone might be aware of a way to do what you want to do. I cannot. You can look at the list of sound/music manipulation tools available as extensions for App Inventor maintained by Taifun App Inventor Extensions | Pura Vida Apps
See these forum discussions about recording sounds https://community.appinventor.mit.edu/search?q=sound and these about using the Player Search results for 'player' - MIT App Inventor Community
Regards,
Steve
I have tried my app. The SoundRecorder and the Player work simultaneously. By inserting the headphones into the mobile phone, both karaoke and voice are recorded together but with low audio quality. Is it because the karaoke audio is heard from the headphones microphone or is the audio recorded automatically with headphones?
Congratulations Jacopo. You discovered a workaround that 'almost works'. Interesting.
Sorry, I do not know why that almost works.
Poor quality could be because of the quality produced by the SoundRecorder (the SR does not produce high quality audio), the characteristics of the device 'microphone' ... the simple hardware in a phone or a tablet will not produce excellent voice quality or something else might be degrading the audio (perhaps the processing capabilities of your device cpu). I seem to recall a post once where someone attempted to record the audio of a phone conversation...they ended producing a very low quality audio file. That is similar to what you are trying to do. Someone might be able to postulate a more concise explanation of what is happening. Sorry, I can't
The SoundRecorder documentation doesn't offer an explanation. The quality of the SoundRecorder audio is not great. To improve it, you need to increase the sampling rate to improve this quality, and possibly also set a different audio format, other than 3gp. This is not possible with SR, there is no method for changing the recording format. You might try Gareth's Mad Robots SoundExtension; however the link I have no longer works. This too Redirecting to Google Groups might help.
Keep experimenting. You seem to be doing fine.
Try a wavRecoder extension instead of the SoundRecoder component.
See also here: https://groups.google.com/g/mitappinventortest/c/a2lTf8VY1uQ/m/HecqHPcMAwAJ
Thank you for your answer, I have replaced the SoundRecorder with the WawSoundRecorder. Is the track automatically saved as for the SoundRecorder? If yes, where is the song saved?
Use this Block to save the track probably using file addresses similar to used to set the sound Source in Taifun's AudioPlayer
What you need for saving to the internalSD would be the relative or absolute path. Does that work?
Did you try the example that is provided with the extension documentation?
I have setted the save path to "/storage/emulated/0/Music/" but the track is not saved .. is it possible that it is because I have an Italian phone? what can I do?
Is there a directory called Music on your phone? Use the File browsing app that is on your phone to find that directory. To save to Music, there must be a directory named Music.
So, does that directory exist on your phone Jacopo?
Maybe you have to ask for WRITE permission (with this ext.):
But couldn't you save the file to internal memory?
No, assets can only be read.
sure, both in the internal memory and in the SD there is the Music folder.
I tried, but it still doesn't work.
OK. Does the folder contain your created file?
If not, try using an absolute path instead of /storage/emulated/0/Music/ ; perhaps try file:///mnt/sdcard/Music/
Post your blocks or better the aia.
Ok, I have uploaded the current .aia file on mediafire at this link: https://www.mediafire.com/file/zj5k10r88qlumlo/CreaCanzoni.aia/file
The max. size of an aia is 10 MB in Ai2:
Or you have to use http://code.appinventor.mit.edu/ (< 50 MB).
so what should I do?