Easily Record Audio with .NET MAUI and Plugin.Maui.Audio

  Рет қаралды 4,370

Gerald Versluis

Gerald Versluis

Күн бұрын

Пікірлер: 53
@jfversluis
@jfversluis Жыл бұрын
🔈Looking to play audio instead? Here it is: kzbin.info/www/bejne/pXq8n3irj56im9k
@iclicksoftware8618
@iclicksoftware8618 Жыл бұрын
hi, Is there a way to record and recognize speech to text at the same time?.
@PierreH1968
@PierreH1968 Жыл бұрын
Great add on to the plugin! Thank you Gerald!
@jfversluis
@jfversluis Жыл бұрын
Thanks Pierre! We got this question a lot, so hopefully this will be useful to people!
@josedonizeteoliveirajunior1744
@josedonizeteoliveirajunior1744 Жыл бұрын
Excellent video, as always🎉
@jfversluis
@jfversluis Жыл бұрын
Thank you so much my friend!
@songperformer_NET
@songperformer_NET 8 ай бұрын
Looks cool, I will have a play with this, I was looking for something like this for a non commercial app I am developing, very well explained
@jfversluis
@jfversluis 8 ай бұрын
Appreciate that! Thank you!
@alexandervillegas5683
@alexandervillegas5683 10 ай бұрын
Thank you for teaching us how to use the audio plugin, I would like to ask you if there is any way to compress the audio, since the file it generates has a wav extension. How could we generate a file with compression and .mp3 extension?
@maxborrmann5663
@maxborrmann5663 8 ай бұрын
you could compress the file server side using ffmpeg
@rodrigoroglio
@rodrigoroglio 4 ай бұрын
Great video, congrats!!! Allow me a little question, please: I´m developing an App that need do capture the sound of surrounding just to get the DECIBEL from the local place... I'm not need to record the audio, just to know the decibels level of the surrounding... this plugin have a way to capture this measure?
@jfversluis
@jfversluis 4 ай бұрын
This plugin does not, sorry!
@rodrigoroglio
@rodrigoroglio 4 ай бұрын
@@jfversluis Do you know anyone that can? ;-)
@ahmadyogi1340
@ahmadyogi1340 Жыл бұрын
Nice video! I want to ask can it also stream the recorded audio so that we can send it let's say to websocket like that?
@lingnaixu334
@lingnaixu334 6 ай бұрын
Thank you so much. This is helpful because there is not much information available. I have actually created and run the simple program, The first StartAsync and StopAsync are successful and the Stream can be played. However, when StartAsync is executed again, a ComException occurs. Are there any points to note?
@DeepWorksStudios
@DeepWorksStudios Жыл бұрын
Awesome Update! Keep it up :)
@jfversluis
@jfversluis Жыл бұрын
Thank you! Will definitely do!
@thisisyusuf
@thisisyusuf Ай бұрын
How can I retrieve the audio file path? I want to use it with the OpenAI API to convert speech into text.
@jfversluis
@jfversluis Ай бұрын
The returning object from the stop recording method should have that information!
@RalphHachache
@RalphHachache 11 ай бұрын
Hello, Great tutorial, can you please show how to do the static implementation. Thanks
@jfversluis
@jfversluis 11 ай бұрын
Check the repository for instructions. You should be able to replace the calls with just basically AudioManager.Current.CreatePlayer(await FileSystem.OpenAppPackageFileAsync("ukelele.mp3"));
@RalphHachache
@RalphHachache 11 ай бұрын
@@jfversluis Thank you ! your a life saver, I got one more question, if I didn't specify the name of the audio or path when recording, how can I later get its path and name
@TheMaundmo1
@TheMaundmo1 11 ай бұрын
@@RalphHachache I am pretty sure, that if you did not specify a path for the recording, then it is not saved into a file. You only have access to the Stream (which is returned by StopAsync). You can however save this stream to a file wherever you want it to be.
@jfversluis
@jfversluis 11 ай бұрын
@TheMaundmo1 if you specify no path a random file is generated for you which you can retrieve from the stop method
@MrMacvos
@MrMacvos 11 ай бұрын
Great tutorial and great plugin! Question: If I pass a filepath as a parameter on StartAsync(), can I then retrieve that file name later on from the 'recordedAudio' variable, like 'recordedAudio.FilePath'?
@RalphHachache
@RalphHachache 11 ай бұрын
Hello, I was trying the same thing, except I didn't pass the filename (randomly generated) and still couldn't get the Filename/path. where you able to find a solution ?
@jfversluis
@jfversluis 11 ай бұрын
When you call StopAsync it will return an object that has details about the file
@RalphHachache
@RalphHachache 11 ай бұрын
the file path is not accessible in the object, I tried it in the sample. thanks for your help @@jfversluis
@septicsolution
@septicsolution Жыл бұрын
Nice addition. Please how can we record screen (video) with .net maui? Thanks in advance
@jfversluis
@jfversluis Жыл бұрын
I'm working on a plugin for that here: github.com/jfversluis/Plugin.Maui.ScreenRecording but Android is a bit harder and I haven't found the time to finish it.
@septicsolution
@septicsolution Жыл бұрын
@@jfversluis Really quick reply. Thanks for the good work. We will wait patiently.
@dancluderay1304
@dancluderay1304 Жыл бұрын
A speech to text feature built in would be great
@jfversluis
@jfversluis Жыл бұрын
That is available in the .NET MAUI Community Toolkit!
@PhantasyAI0
@PhantasyAI0 10 ай бұрын
How about using Plugin.Maui.Audio in a .net maui blazor hybrid? Im new to .net maui in general but are the steps the same in a maui blazor hybrid?
@Steve-3P0
@Steve-3P0 16 күн бұрын
Did you get this to work?
@이캐리-z8w
@이캐리-z8w Жыл бұрын
I tested on an Android emulator in Windows, but it seems like the recording file is not being saved, even though I've checked all the Android permission checkboxes. What could be the issue?
@creativethinking9435
@creativethinking9435 8 ай бұрын
please provide pause function for pause the audio recording
@jfversluis
@jfversluis 8 ай бұрын
For any suggestions please open an issue on the repo!
@aDominarWanderer
@aDominarWanderer Жыл бұрын
I have 4 tabs in my shell tab bar, if i click the 4th tab bar it should open a browser and not a content page how to achieve this in maui
@flauberttagu
@flauberttagu 9 ай бұрын
Is it possible to access to "filepath" using your plugin?
@jfversluis
@jfversluis 9 ай бұрын
Sorry I'm not sure what you're asking
@flauberttagu
@flauberttagu 9 ай бұрын
@@jfversluis the audio file is save on the device. But it is impossible to retrieve the filepath. I said that because in some cases it would be good to get the file itself for more dev options.
@josemanuelgroo
@josemanuelgroo 4 ай бұрын
I am trying to use it in windows but not working, after starting the record and then stop the record it says not recording, any clue about it? I followed all the steps
@XiaoranCheng
@XiaoranCheng 9 ай бұрын
the recorded audio is in the WAVE format and it is extremely large, is there anyway we can save the file as mp3?
@jfversluis
@jfversluis 9 ай бұрын
Not right now, but PRs are welcome!
@XiaoranCheng
@XiaoranCheng 9 ай бұрын
Thank you, I ended up using Andriod's MediaRecorder directly. The recorder in the toolkit is very good and easy to implement, but the large wave format (even we can give it the .mp3 extension) made the recorder not very useful in reality as they are too large to store/transfer....after all no one wants an 5mb audio file that is only 40s long, and realizing that at the end of the development phase was a bit annoying 😂
@jfversluis
@jfversluis 9 ай бұрын
@XiaoranCheng as mentioned: the project is open to improvements by the community. Now only you can benefit in your app, why not share it with others? 🤓
@BurningZa
@BurningZa 10 ай бұрын
The plugin doesn't seem to work on windows.
@jfversluis
@jfversluis 10 ай бұрын
It should! Please open an issue on the repository with what you are seeing :)
@stylrart
@stylrart 6 ай бұрын
it's not working - There is no IsRecording, StartAsync() and StopAsync()... ???
@jfversluis
@jfversluis 6 ай бұрын
The API might have changed a bit since this video but it’s all there, check the docs: github.com/jfversluis/Plugin.Maui.Audio/blob/main/docs/audio-recorder.md
@niteshdhote8493
@niteshdhote8493 6 ай бұрын
i have to save my audio on file path so how can i do it private bool isRecording = false; private Stopwatch stopwatch; private System.Timers.Timer timer; private async void Onclickstart(object sender, EventArgs e) { if (await Permissions.RequestAsync() != PermissionStatus.Granted) { return; } Button startButton = (Button)sender; if (!isRecording) { isRecording = true; stopwatch = new Stopwatch(); stopwatch.Restart(); stopwatch.Start(); startbuttonorg.Text = "Stop"; await _audioRecorder.StartAsync(); timer = new System.Timers.Timer(1000); timer.Elapsed += Timer_Elapsed; timer.Start(); } else { var recordAudio = await _audioRecorder.StopAsync(); player = AudioManager.Current.CreatePlayer(recordAudio.GetAudioStream()); audioControlsStackLayout.IsVisible = true; isRecording = false; stopwatch.Stop(); timer.Stop(); startbuttonorg.Text = "Start"; timer.Dispose(); } } private async void StopRecording() { var recordAudio = await _audioRecorder.StopAsync(); player = AudioManager.Current.CreatePlayer(recordAudio.GetAudioStream()); audioControlsStackLayout.IsVisible = true; isRecording = false; stopwatch.Stop(); timer.Stop(); startbuttonorg.Text = "Start"; timer.Dispose(); } private void Timer_Elapsed(object sender, ElapsedEventArgs e) { Device.BeginInvokeOnMainThread(() => { TimeSpan elapsedTime = stopwatch.Elapsed; labelTimer.Text = elapsedTime.ToString(@"mm\:ss"); if (stopwatch.Elapsed.TotalSeconds >= 30) { StopRecording(); } }); }
Release Your .NET MAUI iOS App to the Apple App Store
27:23
Gerald Versluis
Рет қаралды 39 М.
World’s strongest WOMAN vs regular GIRLS
00:56
A4
Рет қаралды 28 МЛН
Mia Boyka х Карен Акопян | ЧТО БЫЛО ДАЛЬШЕ?
1:21:14
Что было дальше?
Рет қаралды 11 МЛН
Trick-or-Treating in a Rush. Part 2
00:37
Daniel LaBelle
Рет қаралды 41 МЛН
The .NET MAUI Community Toolkit: Converters, Controls and More!
14:59
Gerald Versluis
Рет қаралды 17 М.
Translate Your .NET MAUI App with LocalizationResourceManager.Maui
18:09
Record Your MIC with JavaScript
13:59
Tyler Potts
Рет қаралды 11 М.
Detect Long Press in Your .NET MAUI App with TouchBehavior
11:46
Gerald Versluis
Рет қаралды 3,9 М.
Implement QR Code & Barcode Scanning with Camera.MAUI in .NET MAUI
10:29
.NET MAUI Explained: What is it, How does it work, and What about Blazor?
34:28
Highly Customizable Popups for .NET MAUI with Mopups
18:20
Gerald Versluis
Рет қаралды 32 М.
Sort, Filter & Show Data with this Free DataGrid Control for .NET MAUI
16:30
Use .NET MAUI FilePicker to Pick PDFs, Images, Videos and More!
15:24
Gerald Versluis
Рет қаралды 20 М.
Material Design & Free Controls for .NET MAUI with UraniumUI
16:30
Gerald Versluis
Рет қаралды 19 М.