Create "Read this" command (Dragon) to ask Dragon to read target segment in Trados

Hello everyone, 

I am trying my best to create new commands inside Dragon, but I can't figure out the code to be able to read target segments directly inside Studio (using the "Read this" function of Dragon), without having to open the Dictate box of Dragon.

I thought about using Windows' narrator, but I could find out how to just select and read text. 

Can anyone help? I use the French version of Studio, last version updated.

Thanks a lot!

Mathilde

Parents
  • Hi Mathilde,

    I use the following list command, created in KnowBrainer as a Dragon Voice Command (DVC), for Spanish:

    Command name: Leer <Leer_2>

    SetMicrophone 0
    If _arg1 = "That" Then SendKeys ""
    If _arg1 = "Document" Then SendKeys "{Ctrl+a}"
    If _arg1 = "All" Then SendKeys "{Ctrl+a}"
    If _arg1 = "Next Paragraph" Then SendSystemKeys "{Ctrl+Down}{Ctrl+Shift+Up}"
    If _arg1 = "Previous Paragraph" Then SendSystemKeys "{Ctrl+Down}{Ctrl+Shift+Down}"
    If _arg1 = "Line" Then SendSystemKeys "{Home}{Shift+End}"
    If _arg1 = "Segmento" Then SendSystemKeys "{Ctrl+PgUp}{Ctrl+Shift+Down}"
    If _arg1 = "Siguiente" Then SendSystemKeys "{Down}{Ctrl+PgUp}{Ctrl+Shift+Down}"
    If _arg1 = "Siguiente segmento" Then SendSystemKeys "{Down}{Ctrl+PgUp}{Ctrl+Shift+Down}"
    If _arg1 = "Siguientes tres segmentos" Then SendSystemKeys "{Down}{Ctrl+PgUp}{Ctrl+Shift+Down 3}"
    If _arg1 = "Siguientes cinco segmentos" Then SendSystemKeys "{Down}{Ctrl+PgUp}{Ctrl+Shift+Down 5}"
    If _arg1 = "Siguientes diez segmentos" Then SendSystemKeys "{Down}{Ctrl+PgUp}{Ctrl+Shift+Down 10}"
    If _arg1 = "Siguientes veinte segmentos" Then SendSystemKeys "{Down}{Ctrl+PgUp}{Ctrl+Shift+Down 20}"
    If _arg1 = "Anterior" Then SendSystemKeys "{Ctrl+PgUp}{Up}{Ctrl+PgUp}{Ctrl+Shift+Down}"
    If _arg1 = "Segmento anterior" Then SendSystemKeys "{Ctrl+PgUp}{Up}{Ctrl+PgUp}{Ctrl+Shift+Down}"
    If _arg1 = "Tres segmentos anteriores" Then SendSystemKeys "{Ctrl+PgUp}{Up}{Ctrl+PgDn}{Ctrl+Shift+Up 3}"
    If _arg1 = "Cinco segmentos anteriores" Then SendSystemKeys "{Ctrl+PgUp}{Up}{Ctrl+PgDn}{Ctrl+Shift+Up 5}"
    If _arg1 = "Diez segmentos anteriores" Then SendSystemKeys "{Ctrl+PgUp}{Up}{Ctrl+PgDn}{Ctrl+Shift+Up 10}"
    If _arg1 = "Hasta aquí" Then SendKeys "{Ctrl+Shift+Home}"
    If _arg1 = "Hasta el final" Then SendKeys "{Ctrl+Shift+End}"
    Wait 500
    SendKeys "{Ctrl+c}"
    Wait 500
    SendKeys "{Left}"
    Wait 250
    TTSPlayString ""
    SetMicrophone 1

  • Hello Nora! Thanks a lot for your reply!! 

    Now you may explain me how can I translate this piece of code into my french version??

  • I don't use KnowBrainer, do you think I can program this only with a Dragon command?

  • I don't think so, or at least, I was never able to create a command for this directly in Dragon. 

    Have you tried the SDL TTS app? It may give you the functionality you need. It's in the app store: https://appstore.sdl.com/language/app/sdl-tts/1036/

  • You would just need to:

    1. Change all the Spanish to French, including the name of the command; leave the English as is

    2. Create a list with the appropriate entries, as this is a list command, so that the appropriate list items are mapped to the code.

    My list (Leer_2) for this command looks like this:

    The English equivalents for the items in the list are:

    That

    Document

    All

    Next Paragraph

    Previous Paragraph

    Paragraph

    Line

    Up to Here

    To the End

    Segment

    Previous Segment

    Next Segment

    Next

    Previous

    Next Three Segments

    Next Five Segments

    Next Ten Segments

    Previous Three Segments

    Previous Five Segments

    Previous Ten Segments

    Next Twenty Segments

    This means, for example, that when I say "Leer siguiente segmento" (the underlined portion is an item from the list), which means "Read next segment", the command will find the appropriate line in the code:

    If _arg1 = "Siguiente segmento" Then SendSystemKeys "{Down}{Ctrl+PgUp}{Ctrl+Shift+Down}"

    and press the keys Down+Ctrl+PgUp+Ctrl+Shift+Down, which will select the contents of the next segment, which will then be sent to the text to speech engine.

  • Thank you so much for helping!

    I am now trying to install the plug in to see if it can help me directly.

    I have it on my available plug-ins in studio, but it does not open... I followed the installation steps but I guess something's wrong. Hard to be alone with all this!

Reply Children