check ambient sound level action

420

Active member
ok so i love the app, it's great that i can have it speak certain things to me.

however i often find the volume either to high or to low, so often i either can't really hear it, or it scares the crap out of me.

i am using time of day triggers at the moment to adjust the volume troughout the day,
but that still is far from perfect for me because sometimes the tv or music are on and other times they are not.

so my idea is to have an action that can check the ambient sound level (decibel), and we can then use if clauses to adjust volume accordingly.

i am not sure if this is possible, i see alot of decibelmeter apps on the play store, i tried to make it work with those but so far i havn't found any that have a notification with the current decibel. (if anyone has any other ideas on how to get the decibel from a decibelmeter app to macrodroid i would love to hear them!)

i think it's a pretty cool idea and would be usefull for many people.
 
ok so i love the app, it's great that i can have it speak certain things to me.

however i often find the volume either to high or to low, so often i either can't really hear it, or it scares the crap out of me.

i am using time of day triggers at the moment to adjust the volume troughout the day,
but that still is far from perfect for me because sometimes the tv or music are on and other times they are not.

so my idea is to have an action that can check the ambient sound level (decibel), and we can then use if clauses to adjust volume accordingly.

i am not sure if this is possible, i see alot of decibelmeter apps on the play store, i tried to make it work with those but so far i havn't found any that have a notification with the current decibel. (if anyone has any other ideas on how to get the decibel from a decibelmeter app to macrodroid i would love to hear them!)

i think it's a pretty cool idea and would be usefull for many people.
I believe I once used AutoVoice (the Tasker plugin) to do that. I'm sure there's a plugin that will work, but I believe that was the one.

But yes, it's a good function to have, I second the opinion.
 

Jacob L

Moderator (Lawsonator)
Or change the audio stream to alarm or notification and change the respective volumes
 
Or change the audio stream to alarm or notification and change the respective volumes
Either I'm not understanding you, or you him. :) He wants to make some speech output louder or softer depending on the surrounding noise level, so that he can hear it over other noise, yet not have it too loud when the room is quiet. Is that the issue you're addressing? If so, how would it work?
 

420

Active member
just to give an update; thanks to AkiraMenai i got it to work using automagic app.

(i did not use the tasker plugin because i don't have tasker and did not want to buy it just for this. i also tried automate app because i did not really want to install automagic from outside of the play store and it does have the function, but i could not get it to work propely)

it would still be great if it could be added to macrodroid though, so i won't need another app just for this.
 
just to give an update; thanks to AkiraMenai i got it to work using automagic app.

(i did not use the tasker plugin because i don't have tasker and did not want to buy it just for this. i also tried automate app because i did not really want to install automagic from outside of the play store and it does have the function, but i could not get it to work propely)

it would still be great if it could be added to macrodroid though, so i won't need another app just for this.
Oh, yeah. You don't have to install Tasker to use the plugins. I just couldn't ever figure out how to make the Autovoice plugin work to get a noise level sample without being on all the time, and before I did, the next Automagic update included the functionality anyway so I gave up on the plugin.
 

420

Active member
This could be very useful. Would you mind sharing the macro and what you did in Automagic?

Also, please correct me - MacroDroid has support for Tasker plugins, right?

So does that mean that it's possible to install the AutoVoice Tasker Plugin (https://play.google.com/store/apps/details?id=com.joaomgcd.autovoice), and get MacroDroid to run it without having to buy Tasker itself?

Or do I not understand correctly?
You are right i found that out a couple hours after i posted here, and then i tried to use the Tasker plugin and i was able to add it as An Action in macrodroid but i couldnt get it to actually work and update a variable, i don't know why.

Here is the flow i created in automagic and the macro i use in macrodroid, the trigger is Just An empty trigger (i just run this macro before Every speak text Action and tick the box to wat untill it finished)
 

Attachments

  • Screenshot_20210405-134741.png
    Screenshot_20210405-134741.png
    170.3 KB · Views: 31
  • Screenshot_20210405-135036.png
    Screenshot_20210405-135036.png
    240.2 KB · Views: 32

420

Active member
incase anyone is interested, i just figured out how to do this using autovoice... (this method takes only 1 second, instead of 1-5)

i still trigger it in the same way (from any of my other macro's, using run macro action, tick the box to wait untill finished)

you could use a global variable instead (atleast for the integer) if you want to have the ability to check the last known ambient sound level in any of your other macro's.

(the reason for setting the "current_noise_reading" string variable back to empty at the end is so that the "wait untill" action still works, even if the current noise would be the same as the last time the macro ran)

(i havn't properly set up the if clauses to adjust the volume yet, hence the pop-up action, i believe the current noise reading ranges from -90 to +90)
 

Attachments

  • adjust volume to ambient sound.png
    adjust volume to ambient sound.png
    268.3 KB · Views: 28

roughnecks

Active member
lol, autovoice plugin is total garbage, full of ads, banner, videos, popups.
I wanted to give this macro a go but uninstalled it right away.

We need some native tool!
 

420

Active member
lol, autovoice plugin is total garbage, full of ads, banner, videos, popups.
I wanted to give this macro a go but uninstalled it right away.

We need some native tool!
i would also prefer having this build into macrodroid itself, but that is probably not gonna happen since there is a plugin that already does it.

i don't get how you can call autovoice total garbage though.... it's been working without any problems for me, i also don't think i have seen any ads/banners/videos or popups.... all im seeing is a tasker notification for 1 second while it's listening, and this can probably also be hidden.

if you are talking about the pop-ups that you get when opening the autovoice app itself, you can just choose deny/don't show again... + there is like no reason to open the app anyway... if i remember correctly i just directly added the action in my macro... maybe it gave a pop-up asking for microphone permission once, but i don't really remember.
 

solquest

Member
incase anyone is interested, i just figured out how to do this using autovoice... (this method takes only 1 second, instead of 1-5)

i still trigger it in the same way (from any of my other macro's, using run macro action, tick the box to wait untill finished)

you could use a global variable instead (atleast for the integer) if you want to have the ability to check the last known ambient sound level in any of your other macro's.

(the reason for setting the "current_noise_reading" string variable back to empty at the end is so that the "wait untill" action still works, even if the current noise would be the same as the last time the macro ran)

(i havn't properly set up the if clauses to adjust the volume yet, hence the pop-up action, i believe the current noise reading ranges from -90 to +90)
Hey there.
Could you please help me setting this up on Autovoice?
I tried to do it as well, but string variable is always 0.
Thanks
 

getuxagig

New member
Hello getuxagig.
Could you please tell me how you've set up Autovoice, cause I can't get it working?
Thanks.
Luigi.
Hi, solquest! Sorry, I just saw the message.
Here's the macro I made. It runs every 2 seconds, infinitely, and out of the 2 seconds, it records the sound for 1 second then it displays the value for the current noise and all noises in decibels as a popup message. Beware, as it records for that 1 second, if you're using the microphone with another app, your mic input will be cut off from you and it will be given back to you once the recording has finished (for that 1 second).

Make sure to give all the permissions necessary to AutoVoice. I think I have also set AutoVoice as the default assistant in the accessibility settings of Android, if I'm not mistaken.

You're welcome! :)

P.S:
As an alternative, in a more complicated manner, there could be used termux-microphone-record, pydub (or sox) with termux:tasker and macrodroid.

Here's this post as a reference for using python with termux:tasker and macrodroid:
 

Attachments

  • sound_meter_noise_detector.macro
    7.8 KB · Views: 3
Last edited:
Top