omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Can't install pyttsx3 module

    Pythonista
    6
    33
    17302
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • sulcud
      sulcud last edited by sulcud

      @cvp, you are right, using 0 fixes it, did you find anyway to fix the false positives that is_paused and is_speaking functions return?

      cvp mikael 4 Replies Last reply Reply Quote 0
      • cvp
        cvp @sulcud last edited by cvp

        @sulcud I don't have tested your code thus I didn't know there were some problems, except this one you described. I'll try later, sorry

        1 Reply Last reply Reply Quote 0
        • cvp
          cvp @sulcud last edited by

          @sulcud First, parameter of stopSpeakingAtBoundary_ is also integer...

          1 Reply Last reply Reply Quote 0
          • cvp
            cvp @sulcud last edited by

            @sulcud said:

            did you find anyway to fix the false positives that is_paused and is_speaking functions return?

            No, sorry

            1 Reply Last reply Reply Quote 0
            • JonB
              JonB last edited by

              Haven't tried, but often objc_util.on_main_thread fixes problems like is_paused not reporting correct no values.

              Note is_speaking will return true even if paused...

              cvp 1 Reply Last reply Reply Quote 0
              • cvp
                cvp @JonB last edited by

                @JonB nothing changed for is_speaking, as you did foresee

                1 Reply Last reply Reply Quote 0
                • JonB
                  JonB last edited by

                  Discussion
                  Returns YES if the synthesizer is speaking or has utterances enqueued to speak, even if it is currently paused. Returns NO if the synthesizer has finished speaking all utterances in its queue or if it has not yet been given an utterance to speak.

                  So if you want to know when speaking stops, one would want to check if not speaking, or speaking and paused.

                  Because of threading and such, it might be more reliable to implement the delegate, and then keep track of state within the delegate object, that can then be queried in python code.

                  1 Reply Last reply Reply Quote 1
                  • mikael
                    mikael @sulcud last edited by

                    @sulcud, looking at this putting a wrapper around the delegate as @JonB suggests looks like the best way to get fine control over the speech, being able to highlight individual words as they are spoken etc.

                    Such a wrapper could also include synchronous methods, so that it would be easy to just say something and move on after the talking is done.

                    1 Reply Last reply Reply Quote 1
                    • lyubomyr83
                      lyubomyr83 @sulcud last edited by

                      @sulcud
                      I was remove speech module in my iOS. How to recover???

                      1 Reply Last reply Reply Quote 0
                      • sulcud
                        sulcud last edited by sulcud

                        I think that erasing a Pythonista build-in module is not possible, remember that python has a weird importing system so if you have a script/folder called speech in the same folder of your main script maybe you are importing it instead of the build in one. (python import order is: current dir, ... , site-packages, build-in) but If that is not the case, I think a fresh install of Pythonista could work

                        lyubomyr83 1 Reply Last reply Reply Quote 1
                        • lyubomyr83
                          lyubomyr83 @sulcud last edited by

                          @sulcud fresh install doesn't helped. I was delete speech module before over stash(((. Now i can't recover.

                          1 Reply Last reply Reply Quote 0
                          • JonB
                            JonB last edited by JonB

                            Make sure you don't have a speech.py in site-packages, or in the same folder as the main script you are running. Also make sure you don't have any folders called speech inside site-packages, that includes an init file.

                            As a check, in the console, try

                            import speech
                            

                            If that fails, look at the traceback to show you what failed, which should include a path to the module it was trying to import.

                            1 Reply Last reply Reply Quote 0
                            • cvp
                              cvp last edited by

                              You can also try

                              import speech
                              import inspect
                              print(inspect.getfile(speech)) 
                              

                              Either you will get an error module 'speech' (built-in)> is a built-in module
                              Either you will get its path if another speech module is imported

                              lyubomyr83 1 Reply Last reply Reply Quote 0
                              • lyubomyr83
                                lyubomyr83 @cvp last edited by

                                @cvp
                                get an error module 'speech' (built-in)> is a built-in module

                                cvp JonB 2 Replies Last reply Reply Quote 0
                                • cvp
                                  cvp @lyubomyr83 last edited by

                                  @lyubomyr83 thus, you did not remove it...

                                  1 Reply Last reply Reply Quote 0
                                  • JonB
                                    JonB @lyubomyr83 last edited by JonB

                                    @lyubomyr83 why do you think you deleted the speech module? What error do you get when you try to use it?

                                    Or, are you talking the SpeechModule script that was shared?

                                    In that case, just copy the code again, paste into the editor, and name it something other than speech...

                                    lyubomyr83 1 Reply Last reply Reply Quote 0
                                    • lyubomyr83
                                      lyubomyr83 @JonB last edited by lyubomyr83

                                      @JonB i have two same 3rd generation ipads, run the same program and have voice in one of them and not in another one. Yes, voice is on ))) in settings. And i have not errors.

                                      cvp JonB 2 Replies Last reply Reply Quote 0
                                      • cvp
                                        cvp @lyubomyr83 last edited by

                                        @lyubomyr83 could you try the iOS Shortuts app with "speak text" command, only to check if the problem could come from the hardware and not from Pythonista

                                        lyubomyr83 1 Reply Last reply Reply Quote 0
                                        • lyubomyr83
                                          lyubomyr83 @cvp last edited by

                                          @cvp in iOS settings/speech i hear sound when i change speed (Turtle)

                                          cvp 1 Reply Last reply Reply Quote 0
                                          • cvp
                                            cvp @lyubomyr83 last edited by cvp

                                            @lyubomyr83 ok, but did you try the shortcut ?

                                            And is your script as short as

                                            import speech
                                            speech.say("привет друг", "ru-RU")  # hello friend
                                            
                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Powered by NodeBB Forums | Contributors