Share via


Position the speech bar

By default, Dragon Medical SpeechKit places the speech bar in the bottom-right corner of your web page. To modify the border to which the speech bar is docked initially, change the NUSA_commandBarIsDockedRight and NUSA_commandBarIsDockedBottom variables from the default value of true to false.

If the speech bar is docked to the left or top border, the offset from these borders can be controlled by changing the value in pixels of the NUSA_commandBarLeft and NUSA_commandBarTop variables from their default value of 0.

For example:

var NUSA_commandBarIsDockedRight = false;
var NUSA_commandBarLeft = 10;
var NUSA_commandBarTop = 20;

These settings dock the speech bar to the left border of the browser window with an offset of 10 pixels and don't affect the vertical position.

To dock the speech bar to the top border of the window with an offset of 15 pixels and keep the horizontal position unchanged, set the values as follows:

var NUSA_commandBarIsDockedBottom = false;
var NUSA_commandBarTop = 15;

Changes to the vertical and horizontal position can be combined as needed.

If the user moves the speech bar manually, the last position is stored (in a cookie) and given precedence over the integration-defined position in the next session.

Embedding the speech bar into your web page

To embed the speech bar into your web page, call the NUSA_embedSpeechBar() function. Pass the HTML element which will contain the speech bar as an argument to the function. For example:

NUSA_embedSpeechBar(document.getElementById("speechBarContainer"));

To make the speech bar float again, pass a null value to the function. For example:

NUSA_embedSpeechBar(null);

Users can't move the speech bar manually if it's embedded into your web page.

The speech bar is only displayed if there are speech-enabled controls or application commands.