Output Audio From EZ-B icon Output Audio From EZ-B Example ARC skill demonstrating converting, compressing and streaming MP3/WAV to an EZ-B speaker, with play/stop commands and TTS examples. Try it →
Asked
Resolved Resolved by Athena!

Azure TTS Plays Wrong Device

, I have a sound problem.

Hardware / connection:

  • I have two EZB controllers and one IoTiny:
    • EZB #0 - AP mode
    • IoTiny #1 - client mode (has a Z120 speaker connected)
    • EZB-v4 #2 - client mode

Skills and behavior:

  • In the Soundboard v4 skill settings, IoTiny #1 is selected. This works fine:
controlCommand("Soundboard v4", "Play", "short-sound.mp3", true);

All sounds in that skill play OK on the Z120 attached to the IoTiny.

  • Then I added this to my script:
controlCommand("Azure Text To Speech", "setVoice", "fr-FR-JacquelineNeural");
sleep(500);
Audio.sayEZB("test de voix francaise", 1);

I have checked "Replace Audio Script Commands" in the Azure Text To Speech skill settings. However, the audio always plays on EZB #0. If I replace Audio.sayEZB() with Audio.say(), it plays on the PC, which is fine - the French pronunciation is correct - but why does it not play on IoTiny #1?

I also tried:

Audio.sayEZB("test de voix francaise");

(without an ezbIndex) and the same behavior occurs.

Any ideas?



Related Hardware (view all EZB hardware)
EZ-B V4 by EZ-Robot
EZ-B v4/2 robot controller: dual Cortex ARM, Wi-Fi, audio/video, 24 servo/digital ports, I2C/UART, camera and Synthiam ARC control for custom robots
Wi-Fi / USB
Servos 24
Camera
Audio
UART 3
I2C
ADC 8
Digital 24

Related Robot Skills (view all robot skills)
Speech Synthesis by Synthiam
Speak user-defined text via PC audio or EZ-B v4 speaker; configurable voices, effects and speed; uses Windows TTS; programmatically callable.
Azure TTS for ARC robots: generate natural, customizable neural voices for companion, educational, assistive, and entertainment applications.

ARC Pro

Upgrade to ARC Pro

Take control of your robot's destiny by subscribing to Synthiam ARC Pro, and watch it evolve into a versatile and responsive machine.

Author Avatar
PRO
Canada
Twitter YouTube GitHub
#1  

This behavior usually comes down to how Audio.sayEZB() routes audio versus how the Azure Text To Speech skill is configured.

What’s happening

  • Audio.sayEZB(...) is the built-in ARC audio command for the EZ-B speaker path.
  • The Azure Text To Speech skill only takes over Audio.say() / Audio.sayEZB() if its replacement option is actually being used by that exact skill instance.
  • Since your soundboard is explicitly set to IoTiny #1 and works, that tells us the speaker path itself is fine.
  • But if Azure TTS is still playing on EZB #0, then one of these is likely true:
    1. The Azure TTS skill is not actually the instance replacing the audio commands you’re calling.
    2. The ezbIndex is being ignored because the replacement skill is sending audio to its configured output device.
    3. The skill is configured to output to a different device than you expect.

Important detail

When "Replace Audio Script Commands" is enabled, the Azure TTS skill can override Audio.say() / Audio.sayEZB(). In that case, the output follows the skill’s own configuration, not necessarily the ezbIndex you pass into Audio.sayEZB().

So the 1 in this:

Audio.sayEZB("test de voix francaise", 1);

may not be controlling the Azure TTS output the way you expect once replacement is enabled.


What to check

1) Open the Azure Text To Speech skill settings

Click the kebab / menu icon on the Azure Text To Speech skill and verify:

  • Speak out of EZB is enabled if you want robot audio
  • The skill is not set to output to the PC if you want IoTiny audio
  • The skill instance is the one you intend to use

2) Test the skill directly

Try using the Azure skill’s own ControlCommand instead of Audio.sayEZB():

controlCommand("Azure Text To Speech", "speak", "test de voix francaise");

Or, if you want to wait until it finishes:

controlCommand("Azure Text To Speech", "speakWait", "test de voix francaise");

If that still outputs to EZB #0, then the Azure skill configuration is likely pointing there.

3) Verify the skill name

If you renamed the Azure skill, the controlCommand() target name must match exactly.

4) Check whether multiple audio/TTS skills are active

If more than one speech-related skill is present, one may be intercepting the command path.


Best next test

Try this sequence:

controlCommand("Azure Text To Speech", "setVoice", "fr-FR-JacquelineNeural");
sleep(500);
controlCommand("Azure Text To Speech", "speakWait", "test de voix francaise");

If that works but still goes to the wrong EZ-B, then the output device is controlled in the Azure TTS skill config, not by Audio.sayEZB().


My guess

Because Soundboard v4 is explicitly tied to IoTiny #1 and works, but Azure TTS replacement is still going to EZB #0, I suspect the Azure skill is either:

  • configured to output to EZB #0, or
  • overriding the Audio.sayEZB() call and using its own device routing.

A couple questions

  1. In the Azure Text To Speech skill settings, is "Speak out of EZB" checked?
  2. Is the Azure skill named exactly "Azure Text To Speech" in the project?
  3. Do you have the Azure skill added only once, or is there more than one TTS/speech skill in the project?

If you want, I can help you build the exact ARC script and skill setup so the French voice always comes out of IoTiny #1. Also, ARC’s built-in AI Assistant can often rewrite this kind of script for you right inside the editor:
https://synthiam.com/Products/AI-Assistant

I am a customer support AI and still learning. Please verify important answers in our support documentation. For advanced AI features, use the AI Script Agent built into ARC.
Author Avatar
PRO
Germany
#2  
controlCommand("Azure Text To Speech", "setVoice", "fr-FR-JacquelineNeural");
sleep(500);
controlCommand("Azure Text To Speech", "speakWait", "test de voix francaise");

it goes to the pc. the "speak out of ezb " , same behavior if it is checked or not. only one azure skill. soundboard v4 is loaded as well. looks like, the output is ok on ezb #0 or pc but not on another ezb #1

Author Avatar
PRO
Germany
#3  

good news, i removed the skill azure and I loaded the skill speech settings, choose the right voice , check enabled and it works. thanks for your support

📚 This thread has been preserved as a helpful resource!

While new comments are no longer being accepted, the information here remains available for learning and reference. Check the most recent comment for additional details.