Thumbnail

Audiotoolbox Plugin

by Avatarptp

Allows ARC to use UWP speech voices, change default audio devices, capture sound and route to an EZB.

Requires ARC v15 (Updated 11/3/2020)

How to add the Audiotoolbox Plugin robot skill

  1. Load the most recent release of ARC (Get ARC).
  2. Press the Project tab from the top menu bar in ARC.
  3. Press Add Robot Skill from the button ribbon bar in ARC.
  4. Choose the Audio category tab.
  5. Press the Audiotoolbox Plugin icon to add the robot skill to your project.

Don't have a robot yet?

Follow the Getting Started Guide to build a robot and use the Audiotoolbox Plugin robot skill.

How to use the Audiotoolbox Plugin robot skill

Allows ARC to use UWP speech voices, change default audio devices, capture sound and route to an EZB.

*** Version 14 ***

Minor bug fix (memory release)

*** Version 13 ***

Fix for ARC 2020.02.28.00 release

*** Version 12 ***

Fix for ARC 2020.02.19.00 release

*** Version 11 ***

Fix for new ARC version

*** Version 10 ***

ImportUWPVoices command restored

*** Version 9 ***

Bug Fix (UI sync monitor object waits indefinitely, solution pulse the monitor when leaving ARC)

*** Version 8 ***

Build Fix

*** Version 7 ***

Bug Fixes

*** Version 6 ***

Added Audio Session Tracking

Audio Session Tracking mode can be configured to:

  1. None No tracking (default)

  2. All Tracks all audio sessions from all processes

  3. CurrentProcess Tracks only the current process (ARC instance) audio sessions

User-inserted image

When the Audio Session Tracking is active (All / CurrentProcess) an EZ-Script variable $NumberOfActiveAudioSessions counts the number audio sessions are active (playing) on the default render (output) device.

User-inserted image

a value of zero means the render device is idle.

sample script:

#Say and do not wait
Say("How vexingly quick daft zebras jump!")

#wait 100 ms to allow the session counter variable to update 
Sleep(100) 

#at least 1 will be printed 
print($NumberOfActiveAudioSessions)
#wait for #active audio sessions is zero (render/output device is idle) 
WaitFor($NumberOfActiveAudioSessions=0)

Say("Jived fox nymph grabs quick waltz.")
Sleep(100)
print($NumberOfActiveAudioSessions)
WaitFor($NumberOfActiveAudioSessions=0)

print($NumberOfActiveAudioSessions)

*** Version 5

Cortana Voice Added

*** Version 4 : New Features


ControlCommand("AudioToolbox Plugin", "ImportUWPVoices")

The above script command allows ARC to access the UWP Voices.

How to use quick video:

*** Version 2 : New Features

Set Default Devices:

User-inserted image

Select the desired devices and press "Set Default" button

Set Default Devices via EZ-Script:

First configure the devices:

User-inserted image

script:


#SetDefault takes in consideration the device type (input or output)

#Set device 0 as default  
ControlCommand("AudioToolbox Plugin", "SetDefault", 0)
SayWait("Hello Device 0") 

#Set device 1 as default  
ControlCommand("AudioToolbox Plugin", "SetDefault", 1)
SayWait("Hello Device 1") 

*** Version 1

  1. Start Capturing sound on device #1:

ControlCommand("AudioToolbox Plugin", "StartCapture", 1)

  1. Set EZB #0 to listen to device #1:

#0 = EZB Controller Index (0..4)
#1 = Device Index (0..2) 
#75 = Volume 
ControlCommand("AudioToolbox Plugin", "StartEZBListen", 0, 1, 75)

2.1) Add EZB #1 to listen to device #1:


ControlCommand("AudioToolbox Plugin", "StartEZBListen", 1, 1, 100)

  1. Stop EZB #0 to listen

ControlCommand("AudioToolbox Plugin", "StopEzbListen", 0)

  1. Stop Capture on device #1

ControlCommand("AudioToolbox Plugin", "StopCapture", 1)


Note:

You have the option to configure the 3 devices (device num: 0 .. 2):

User-inserted image


ARC Pro

Upgrade to ARC Pro

Don't limit your robot's potential – subscribe to ARC Pro and transform it into a dynamic, intelligent machine.

Australia
#1  

Hi @ptp,

The AudioToolbox works fine on one computer but on another one, the following error comes up when adding the control:

Quote:

Version: 2019.05.08.00

System.IO.FileNotFoundException: Could not load file or assembly 'AudioToolbox.Managed, Version=1.0.5.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The specified module could not be found. File name: 'AudioToolbox.Managed, Version=1.0.5.0, Culture=neutral, PublicKeyToken=null' ---> System.IO.FileNotFoundException: Could not load file or assembly 'AudioToolbox.Managed.dll' or one of its dependencies. The specified module could not be found. File name: 'AudioToolbox.Managed.dll' at EZ_Builder.FormMain.jV8wBR46w4(Object , ResolveEventArgs ) at ARC.Plugin.Common.Global.CurrentDomain_AssemblyResolve(Object sender, ResolveEventArgs args) in C:\dev\tests\ezr\ARC.Plugin.Common\ARC.Plugin.Common\Global.cs:line 68 at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)

at AudioToolbox.EZPlugin.MainForm.MainForm_Load(Object sender, EventArgs e) at System.Windows.Forms.Form.OnLoad(EventArgs e) at System.Windows.Forms.Form.OnCreateControl() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl() at System.Windows.Forms.Control.WmShowWindow(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.Form.WmShowWindow(Message& m) at System.Windows.Forms.Form.WndProc(Message& m) at EZ_Builder.UCForms.FormPluginMaster.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

The plugin is installed and the control can be added to the project. The cog button throws a null pointer exception too but I assume that's because it couldn't load the assembly as above. It seems this other computer is missing a dependency but I'm not sure what that could be.

PRO
USA
#2  

@Vicent: Maybe some file failed during the install ?

I took a peek in the audiotoolbox plugin's folder:

User-inserted image

A few ideas:

  1. Check if there are missing files (maybe the install failed)
  2. Confirm ARC is not running and run the plugin install
  3. Recheck the folder content.
#3  

I'm having the exact same problem. It installs fine on my laptop, but on the other computer I need to run it on, I get the same error as the original poster. I checked the install directory, no files are missing. I closed ARC and re-installed the plugin.  Problem remains the same.

I had ARC running during the first install, could that have caused an issue?

User-inserted image

PRO
USA
#4  

I found the issue the AudioToolbox.managed.dll is a c++ project and includes debug information and requires external debug dlls present in some environments e.g. development machines visual studio or data management tools.

I released a new version #8, please confirm if the issue is solved.

Australia
#5  

@ptp: Version 8 doesn't raise any complaints about finding or loading the plugin which is great. However, it seems to leave behind a background process even after ARC is closed. Opening and closing the project multiple times leaves behind just as many processes which I close through Task Manager.

Australia
#6  

To clarify, I was seeing this problem when using version 7 as well but didn't know what was causing it. I'm not sure which version may have introduced this bug.

PRO
USA
#7  

@Vincent.j It's fixed.

The bug was introduced in version #7 when solving the random crash/hang.

Thanks for feedback.

#8  

I'm having trouble updating to the new version, but I think it's because I still have the background processes running.. I'll reboot and try again.

#9  

OK! Got it updated and running.   But, still having an issue.  I've installed the UK English Windows voices.  After running the plugin, Hazel is the only additional voice to show up in ARC. I also tried running the "ImportUMPVoices" script as shown on this page, but it returns an error.   I've attached snapshots below:

User-inserted image

User-inserted image

Australia
#10  

Thanks @ptp. The background process bug is fixed.

PRO
USA
#11  

@kaptaink_cg I've restored the ImportUMPVoices feature

PRO
USA
#13  

Why is there no (New ARC ARC Beta 2020.02.19.00) no audio toolbox plugin? need a fix please Mr. ptp -  Will there be one?

No more windows voices

User-inserted image

PRO
Synthiam
#14   — Edited

I’m sure the author would be inclined to help you if you were a little more polite and less demanding:) just a thought

and perhaps you would want to respond to the thread of the plugin rather than creating something new and detached

PRO
USA
#15  

Sorry, I did not intent any thing

You always do a great job

thanks again

PRO
Synthiam
#16  

Thank you, but I’m not the author of that plugin:)

PRO
USA
#17   — Edited

oh,  the author - ptp

PRO
USA
#18   — Edited

need a fix for the audio toolbox plugin - with new ARC program

for windows voices don't work anymore

EZ ANG

PRO
USA
#20  

User-inserted image

Me calling the team...

PRO
USA
#21  

User-inserted image

Team ... What ?

PRO
USA
#22  

Fixed, doing the final tests.

PRO
USA
#23  

thanks ptp my robot friend

PRO
USA
#24  

lol, well is it done?, lol, lol

#25  

EZAng... Breath now..... Your reek of desperation was quite off putting....

PRO
USA
#26   — Edited

you guys are the programmers

I am just an old man:(

#27   — Edited

What ptp forgot to mention and I am on good authority to say is that he secretly installed a "rootkit" in the plug targeted to your specific pc and network.... cool:p

#28   — Edited

Patience is a virtue... ptp works full time and has a family... He generously made this plug-in on his own time which he doesn't have much of... Some of us still work and are busy so showing some patience and consideration would go a long way if you want others to help you....

FYI I am not a professional programmer, however ptp is....

PRO
USA
#29   — Edited

All kidding around aside,

I think this typing has sent a wrong message to you and ptp, forgive me if it has.

I am not in any rush nor am I trying to pressure ptp to do anything.

Believe me, I have another life here also.

I have already move on to other things...

be well

EZAng

PS. I am aware of Justin Kruger and David Dunning and the Dunning and Kruger effect

PRO
USA
#30   — Edited

Dunning-Kruger - please be careful on what you type.

I am aware of Justin Kruger and David Dunning and the Dunning and Kruger effect

I don't know you nor do you know me.

I believe, as text messages can send a wrong message, here too I see this might be happening.

As I stated on the other site, I am not in a rush nor am I trying to pressure anyone here.

be well

Ezang

#31   — Edited

Crap, I knew I shouldn't have downloaded the Kindle version of the Catcher in the rye... Now CSIS (Canadian secret service) will be watching me...:p Justin Bieber or Justin Trudeau ... can never remember which one is Prime Minister. To be honest I don't think it would matter.... Anyway one of them is going to be mad at me I guess....

Relax man and enjoy your plug-in......

PRO
USA
#32   — Edited

Fixed & Released. Please report any collateral damage.

PRO
USA
#33   — Edited

Hi, I just got back, Thanks ptp, whatever you did, it seems to work again.

Ever want to start a beginners coding class?

all the best

EZang

PRO
USA
#34  

hello ptp,, what is your price for another update?  Audio toolBox Plugin

thanks,

EZang

PRO
USA
#35  

Fixed & Released.

PRO
USA
#36  

100,000,000  thanks to you  my friend :-)

If you want to teach me, I am always ready to learn

I am taking java classes online now

thanks again

EzAng

#37   — Edited

@EzAng... Teach you what? How to write a plugin? If it is a plugin you want to develop you are taking the wrong course... I believe you need to learn C# instead.... Javascript in terms of ARC is used for coding or scripting as an alternative to ezscript....

Here's the link for making a plugin for ARC... ARC skill plugin

PRO
USA
#38   — Edited

Dunning-Kruger, how are you?

Today, I accomplished AIML Bot (added my code) Pandora bot, maybe tomorrow I will conquer C # or whatever which way the wind will blow me.

I love learning, I have been using "processing" and java (object-oriented programming) to use the Kinect I have- cool stuff.

all the best to you

EzAng

PRO
USA
#39  

Fixed a minor bug and I've updated the build environment for VC142. Let's hope nothing is broken:)

PRO
USA
#40  

can't get it to work

PRO
USA
#41  

Ezang can you provide more details ?

PRO
USA
#42  

It keeps downloading

User-inserted image

User-inserted image

says it requires a 3rd party plugin

then download again, again

PRO
USA
#43  

PTP I never heard back from you,

still keeps downloading,

the window says:

  1. Close this plugin installer *
    1. Exit ARC *
    1. Double-click on the downloaded plugin file to launch this installer again *
    1. Reload ARC and the plugin will be successfully installed *
  •                                                                          *
    
  •                                                                          *
    
  • If you require additional assistance, please ask on the Synthiam community *
  • forum. We'll be happy to help! https://synthiam.com *
  •                                                                          *
    

Took 00:00:01.1429917

Press any key to close this window.

So I press any key to close this window, then it starts all over again downloading

EzAng

PRO
USA
#44  

@Ezang I had no problem updating the last version.

Can you please restart your machine, click the plugin file and check if the upgrade is successful.

PRO
USA
#45   — Edited

ok I will

by the way, the audio Box plugin is greyed out - did you know that?

User-inserted image

Thanks, I will re-boot now

EzAng

PRO
USA
#46  

I re- booted

All good now,

cheers!

EzAng

#47  

Ah-ha! The #1 universal basic troubleshooting procedure for all computer based products still works! Reboot!

PRO
USA
#48   — Edited

lol  that's right my friend

the famous Reboot!

EzAng

#49  

haha true... but my all time favorite was >Format C:\s  :D

PRO
USA
#50  

how about  ctrl  alt  delete

I still use this, lol