• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Suggestion: SAY - speaks provided text

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Suggestion: SAY - speaks provided text

    Hello,

    this is a very good function, which is used by me in another software. It could be put among „Shared Alert and Debug Methods”.

    --------------------------
    Say(''text'', purge = True);

    FUNCTION Say() function speaks user-specified text (Windows XP, Vista, on lower-end Windows you need to install Microsoft Speech API, voice settings are in Windows Control Panel)

    Full description link

    #2
    Hello,


    Thank you for your post and suggestion!

    I will forward this information to development for future consideration.
    Ray SNinjaTrader Customer Service

    Comment


      #3
      tamas,

      As a workable solution I downloaded a couple of TTS applications http://www.filesland.com/download/text-to-voice.html and created some .wav files. I can then call the .wav file using the PlaySound("mySound.wav"); command. Works nicely for my needs. I am sure there are a lot of free applications or applications with a 30 day free trial.

      Comment


        #4
        Originally posted by TAJTrades View Post
        As a workable solution I downloaded a couple of TTS applications http://www.filesland.com/download/text-to-voice.html and created some .wav files. I can then call the .wav file using the PlaySound("mySound.wav"); command. Works nicely for my needs. I am sure there are a lot of free applications or applications with a 30 day free trial.
        Thanks the idea, but i dont want to create wav file. I DONT WANT

        IT would be easier to call say method, eg:
        Code:
        entryPrice = 1234.56;
        myInstrument = "MSFT";
        Say("Sample strategy by " + myInstrument + " at " + entryPrice + " price.");
        (of course i will check url)

        Comment


          #5
          I have my NinjaTrader "speaking" already but I don't have a solution yet which I just could export and post here for easy implementation.
          However if you are interested (and may be there are some others) let me know and I will come up with something

          Comment


            #6
            Speech was something I really really liked on Amibroker.

            I would love to have this feature on NT.

            I tried adding linking the Microsoft TTS kit to NT.. without luck.
            I can write indicators and systems, but am not experienced enough with the MS .NET systems to understand the correct way to add external references etc,

            Comment


              #7
              Hello to all,

              http://www.tradingstudies.com/downlo...peechSetup.exe

              1. Shutdown NT
              2. Run install
              3. Start NT
              4. Open any indicator for editing.
              5. Right click on the editor window and select References
              6. Click Add
              7. Select TradingStudies.Speech.dll and click Open
              8. Click OK
              9. Hit F5 to compile

              Your NinjaTrader should be ready to speak.

              Usage:

              Say(string text, int secondstowaituntilfinished);

              Second parameter defines amount of seconds to wait until "speaking object" goes out of scope.

              If you set it to zero, Garbage Collector might destroy it before it finishes it's speach.

              Example of usage:

              if (Close[0] > Open[0])
              Say ("We have a green bar", 2);
              else
              Say("Sorry, does not look like we have possitive price movement", 3);


              This is not fully tested product, so use it at your own risk.
              Any feedback is appreciated.

              Thank you
              roonius

              Comment


                #8
                Hi roonius,

                good work, but is your code asyncronious or syncronious?

                I also use the MS Speech api and the functions there are very simple to use.
                I ran into problems calling speech api from time critical code like OnMarketDataUpdate(), NT seems locked and unresponsive until the speaking voice has finished. This is unacceptable for my trading style, because I cannot wait for a 30 seconds speaking to finish before I can do anything in NT ( orders, stops etc)

                I ended up using a ThreadPool and a Queue of the strings to speak and I run SpeakText() from a background thread.

                To NT developers: Will NT7 be based on .NET 3.5 ?
                Since .NET 3.5 contains all the speech API stuff , this would make implemtation easier.

                Have a nice weekend

                Andreas

                Comment


                  #9
                  Originally posted by zweistein View Post
                  Hi roonius,

                  good work, but is your code asyncronious or syncronious?

                  I also use the MS Speech api and the functions there are very simple to use.
                  I ran into problems calling speech api from time critical code like OnMarketDataUpdate(), NT seems locked and unresponsive until the speaking voice has finished. This is unacceptable for my trading style, because I cannot wait for a 30 seconds speaking to finish before I can do anything in NT ( orders, stops etc)

                  I ended up using a ThreadPool and a Queue of the strings to speak and I run SpeakText() from a background thread.

                  To NT developers: Will NT7 be based on .NET 3.5 ?
                  Since .NET 3.5 contains all the speech API stuff , this would make implemtation easier.

                  Have a nice weekend

                  Andreas
                  Async

                  As long as I know NT7 will be based on .NET 3.5

                  You can use System.Speech now if you have 3.5, however you won't be able to compile with NT editor - you will need to use VS

                  Comment


                    #10
                    thank you,

                    ok with.NET 2.0 you can use interop.speechlib.dll from MSFT speechapi , just put it in the Ninjatrader\bin directory.

                    My comment on .NET 3.5 was intended as a hint not to spend to much effort in the old stuff.

                    Best regards
                    andreas

                    Comment


                      #11
                      Originally posted by roonius View Post
                      Hello to all,
                      .....
                      This is not fully tested product, so use it at your own risk.
                      Any feedback is appreciated.
                      Thank yu roonius, i will try it today

                      Comment


                        #12
                        Originally posted by roonius View Post
                        Hello to all,

                        http://www.tradingstudies.com/downlo...peechSetup.exe

                        [...]

                        This is not fully tested product, so use it at your own risk.
                        Any feedback is appreciated.

                        Thank you
                        roonius
                        Hello,

                        I checked, it works and very good. I checked how you did that, and it gave solution to me to an other problem, as well, so it makes me happy.

                        Thanks twice as much!

                        Comment


                          #13
                          Originally posted by zweistein View Post
                          thank you,

                          ok with.NET 2.0 you can use interop.speechlib.dll from MSFT speechapi , just put it in the Ninjatrader\bin directory.

                          Best regards
                          andreas
                          Hi , have you any code to share regarding this issue ? Is it compatible with .NET 3.5 ?

                          Comment


                            #14
                            Has anyone found a working solution for this in NT7?? I want to have TTS tell me long/short and the name of the security, or something like that.

                            Comment


                              #15
                              With my COTReport indicator there is included my Zweistein.Library.dll

                              There i have implemented an async SpeakText(string text) function using net 3.5

                              regards
                              andreas


                              www.zweisteintrading.eu

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by brokerbombero, Today, 09:42 AM
                              2 responses
                              22 views
                              0 likes
                              Last Post brokerbombero  
                              Started by 12VMan, Today, 09:29 AM
                              1 response
                              12 views
                              0 likes
                              Last Post NinjaTrader_PatrickG  
                              Started by PBreen, Today, 08:41 AM
                              1 response
                              6 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Started by U0000999, Today, 05:54 AM
                              2 responses
                              20 views
                              0 likes
                              Last Post NinjaTrader_ChrisL  
                              Started by Leeroy_Jenkins, 08-16-2019, 08:35 AM
                              7 responses
                              111 views
                              1 like
                              Last Post guidoisot  
                              Working...
                              X