Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Error/Bug
    4. [gelöst] BUG: sayit funktioniert bei win nicht zuverlässig.

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    UNSOLVED [gelöst] BUG: sayit funktioniert bei win nicht zuverlässig.

    This topic has been deleted. Only users with topic management privileges can see it.
    • bahnuhr
      bahnuhr Forum Testing Most Active @bahnuhr last edited by

      @bahnuhr sagte in BUG: sayit funktioniert unter win nicht zuverlässig.:

      manchmal steht im log "copied" dann ist die mp3 richtig.
      Aber manchmal auch nicht. Dann wird die mp3 richtig angesagt aber die Datei ist noch die alte.

      Wie hier schon erwähnt wird nur manchmal kopiert (Logik ist für mich nicht ersichtlich).

      Kann man dies ändern?

      Also jedes mal speichern.
      Dann müsste doch die mp3 richtig sein.

      apollon77 1 Reply Last reply Reply Quote 0
      • apollon77
        apollon77 @bahnuhr last edited by

        @bahnuhr Log?

        bahnuhr 1 Reply Last reply Reply Quote 0
        • bahnuhr
          bahnuhr Forum Testing Most Active @apollon77 last edited by

          @apollon77 sagte in BUG: sayit funktioniert unter win nicht zuverlässig.:

          @bahnuhr Log?

          Gerne.
          Die ersten beiden Mal hat er nicht kopiert. Die nächsten Male aber doch.
          Vielleicht hilfst weiter.

          
          sayit.2	2020-07-28 13:42:53.605	debug	(146500) Duration "x y z": 3
          sayit.2	2020-07-28 13:42:53.505	info	(146500) Copied file "C:\iobroker\iobroker-data\sayit/sayit.2.say.mp3" to "C:\iobroker\cache\870dc326c1db7d0947a8cabda92536e2.mp3"
          sayit.2	2020-07-28 13:42:53.503	debug	(146500) Caching File C:\iobroker\cache\870dc326c1db7d0947a8cabda92536e2.mp3 for "de-DE_CLOUD_Female;x y z" now
          sayit.2	2020-07-28 13:42:53.502	debug	(146500) Status code: 200
          sayit.2	2020-07-28 13:42:53.321	debug	(146500) Cache File C:\iobroker\cache\870dc326c1db7d0947a8cabda92536e2.mp3 for "de-DE_CLOUD_Female;x y z" not found
          sayit.2	2020-07-28 13:42:53.321	info	(146500) saying: x y z
          
          sayit.2	2020-07-28 13:42:10.571	debug	(146500) Duration "test 1 2 ": 2
          sayit.2	2020-07-28 13:42:10.569	info	(146500) Copied file "C:\iobroker\iobroker-data\sayit/sayit.2.say.mp3" to "C:\iobroker\cache\6a9f31711abaa6d2303693eb16ff2686.mp3"
          sayit.2	2020-07-28 13:42:10.567	debug	(146500) Caching File C:\iobroker\cache\6a9f31711abaa6d2303693eb16ff2686.mp3 for "de-DE_CLOUD_Female;test 1 2 " now
          sayit.2	2020-07-28 13:42:10.565	debug	(146500) Status code: 200
          sayit.2	2020-07-28 13:42:10.401	debug	(146500) Cache File C:\iobroker\cache\6a9f31711abaa6d2303693eb16ff2686.mp3 for "de-DE_CLOUD_Female;test 1 2 " not found
          sayit.2	2020-07-28 13:42:10.401	info	(146500) saying: test 1 2
          
          sayit.2	2020-07-28 13:41:42.927	debug	(146500) Duration "1 2 3 4 5 ": 3
          sayit.2	2020-07-28 13:41:42.924	info	(146500) Copied file "C:\iobroker\iobroker-data\sayit/sayit.2.say.mp3" to "C:\iobroker\cache\9f64f57da4f54dfb6225235430ed13a9.mp3"
          sayit.2	2020-07-28 13:41:42.923	debug	(146500) Caching File C:\iobroker\cache\9f64f57da4f54dfb6225235430ed13a9.mp3 for "de-DE_CLOUD_Female;1 2 3 4 5 " now
          sayit.2	2020-07-28 13:41:42.922	debug	(146500) Status code: 200
          sayit.2	2020-07-28 13:41:42.748	debug	(146500) Cache File C:\iobroker\cache\9f64f57da4f54dfb6225235430ed13a9.mp3 for "de-DE_CLOUD_Female;1 2 3 4 5 " not found
          sayit.2	2020-07-28 13:41:42.748	info	(146500) saying: 1 2 3 4 5
          
          sayit.2	2020-07-28 13:41:11.051	debug	(146500) Duration "a b c d ": 2
          sayit.2	2020-07-28 13:41:11.049	info	(146500) Copied file "C:\iobroker\iobroker-data\sayit/sayit.2.say.mp3" to "C:\iobroker\cache\bee5de77c6cefefd29409e80ad13af2a.mp3"
          sayit.2	2020-07-28 13:41:11.048	debug	(146500) Caching File C:\iobroker\cache\bee5de77c6cefefd29409e80ad13af2a.mp3 for "de-DE_CLOUD_Female;a b c d " now
          sayit.2	2020-07-28 13:41:11.047	debug	(146500) Status code: 200
          sayit.2	2020-07-28 13:41:10.856	debug	(146500) Cache File C:\iobroker\cache\bee5de77c6cefefd29409e80ad13af2a.mp3 for "de-DE_CLOUD_Female;a b c d " not found
          sayit.2	2020-07-28 13:41:10.856	info	(146500) saying: a b c d
          
          sayit.2	2020-07-28 13:40:37.353	debug	(146500) Duration "Hallo": 1
          sayit.2	2020-07-28 13:40:37.352	info	(146500) Copied file "C:\iobroker\iobroker-data\sayit/sayit.2.say.mp3" to "C:\iobroker\cache\b9732e55d1e0743f0374dfbe0a5ac64e.mp3"
          sayit.2	2020-07-28 13:40:37.345	debug	(146500) Caching File C:\iobroker\cache\b9732e55d1e0743f0374dfbe0a5ac64e.mp3 for "de-DE_CLOUD_Female;Hallo" now
          sayit.2	2020-07-28 13:40:37.335	debug	(146500) Status code: 200
          sayit.2	2020-07-28 13:40:37.075	debug	(146500) Cache File C:\iobroker\cache\b9732e55d1e0743f0374dfbe0a5ac64e.mp3 for "de-DE_CLOUD_Female;Hallo" not found
          sayit.2	2020-07-28 13:40:37.075	info	(146500) saying: Hallo
          
          sayit.2	2020-07-28 13:39:53.032	debug	(146500) Duration "test 2": 2
          sayit.2	2020-07-28 13:39:53.025	info	(146500) saying: test 2
          
          sayit.2	2020-07-28 13:39:19.511	debug	(146500) Duration "test 3": 2
          sayit.2	2020-07-28 13:39:19.480	info	(146500) saying: test 3
          
          apollon77 1 Reply Last reply Reply Quote 0
          • apollon77
            apollon77 @bahnuhr last edited by apollon77

            @bahnuhr sagte in BUG: sayit funktioniert unter win nicht zuverlässig.:

            Copied

            Das wird über einen Stream gemacht ... und mit genau denen hatten wir bei Windows schonmal Probleme beim Logging.

            Update nochmal ... ich hab mal jetzt copyFile von nodejs verwendet ... gibts aber erst ab nodejs 8, aber da sist jetzt EOL ... also braucht nodejs 8.5+ dann jetzt!

            sigi234 1 Reply Last reply Reply Quote 1
            • bahnuhr
              bahnuhr Forum Testing Most Active last edited by

              @apollon77
              Hallo,

              sayit.2	2020-07-28 15:07:58.410	debug	(6764) Duration "test 1 2 3": 3
              sayit.2	2020-07-28 15:07:58.404	info	(6764) saying: test 1 2 3
              sayit.2	2020-07-28 15:07:31.935	debug	(6764) Duration "test 1 2 3": 3
              sayit.2	2020-07-28 15:07:31.933	info	(6764) Copied file "C:\iobroker\iobroker-data\sayit/sayit.2.say.mp3" to "C:\iobroker\cache\05b3c89f93969b153a9d5d986b7ec4ab.mp3"
              sayit.2	2020-07-28 15:07:31.933	debug	(6764) Caching File C:\iobroker\cache\05b3c89f93969b153a9d5d986b7ec4ab.mp3 for "de-DE_CLOUD_Female;test 1 2 3" now
              sayit.2	2020-07-28 15:07:31.931	debug	(6764) Status code: 200
              sayit.2	2020-07-28 15:07:31.752	debug	(6764) Cache File C:\iobroker\cache\05b3c89f93969b153a9d5d986b7ec4ab.mp3 for "de-DE_CLOUD_Female;test 1 2 3" not found
              sayit.2	2020-07-28 15:07:31.752	info	(6764) saying: test 1 2 3
              sayit.2	2020-07-28 15:07:11.130	debug	(6764) Duration "test abcdef": 2
              sayit.2	2020-07-28 15:07:11.128	info	(6764) Copied file "C:\iobroker\iobroker-data\sayit/sayit.2.say.mp3" to "C:\iobroker\cache\aa7106ec4140aa0958c7214f7e202a02.mp3"
              sayit.2	2020-07-28 15:07:11.125	debug	(6764) Caching File C:\iobroker\cache\aa7106ec4140aa0958c7214f7e202a02.mp3 for "de-DE_CLOUD_Female;test abcdef" now
              sayit.2	2020-07-28 15:07:11.120	debug	(6764) Status code: 200
              sayit.2	2020-07-28 15:07:10.899	debug	(6764) Cache File C:\iobroker\cache\aa7106ec4140aa0958c7214f7e202a02.mp3 for "de-DE_CLOUD_Female;test abcdef" not found
              sayit.2	2020-07-28 15:07:10.899	info	(6764) saying: test abcdef
              

              Log sieht vergleichbar aus.
              Kann es sein, wenn man den gleichen Befehl nochmal sendet, dass dann der copy Befehl nicht kommt.
              Siehe log ganz oben.

              1 Reply Last reply Reply Quote 0
              • sigi234
                sigi234 Forum Testing Most Active @apollon77 last edited by

                @apollon77

                Geht jetzt bei mir.

                sayit.0	2020-07-28 15:06:58.078	info	(11460) Copied file "C:\Program Files\iobroker\Test\iobroker-data\sayit/sayit.0.say.mp3" to "C:\Program Files\iobroker\Test\cache\d72f7f703b392c5f75121b51ee14540e.mp3"
                
                bahnuhr 1 Reply Last reply Reply Quote 0
                • bahnuhr
                  bahnuhr Forum Testing Most Active @sigi234 last edited by

                  @sigi234 sagte in BUG: sayit funktioniert unter win nicht zuverlässig.:

                  Geht jetzt bei mir.

                  Ging doch vorher auch schon bei dir 😉

                  sigi234 1 Reply Last reply Reply Quote 0
                  • sigi234
                    sigi234 Forum Testing Most Active @bahnuhr last edited by sigi234

                    @bahnuhr sagte in BUG: sayit funktioniert unter win nicht zuverlässig.:

                    @sigi234 sagte in BUG: sayit funktioniert unter win nicht zuverlässig.:

                    Geht jetzt bei mir.

                    Ging doch vorher auch schon bei dir 😉

                    Ansage ja, File wurde aber nicht in den Ordner sayit geschrieben

                    1 Reply Last reply Reply Quote 0
                    • bahnuhr
                      bahnuhr Forum Testing Most Active last edited by

                      @sigi234 sagte in BUG: sayit funktioniert unter win nicht zuverlässig.:

                      @bahnuhr sagte in BUG: sayit funktioniert unter win nicht zuverlässig.:

                      @sigi234 sagte in BUG: sayit funktioniert unter win nicht zuverlässig.:

                      Geht jetzt bei mir.

                      Ging doch vorher auch schon bei dir 😉

                      Ansage ja, File wurde nicht in den Ordner sayit geschrieben

                      Supi, ich werde das mal weiter beobachten und heute abend damit ein bisschen rumspielen.
                      Mal schauen ob es immer klappt.

                      1 Reply Last reply Reply Quote 0
                      • bahnuhr
                        bahnuhr Forum Testing Most Active last edited by

                        noch ne Frage:

                        Bei Objekt: sayit.2.tts.mp3
                        ist ein Link genannt; der bei klick die mp3 abspielt.

                        Kann man diesen Link auch per Script irgendwie als Datei (also die mp3) speichern?

                        Wäre ja dann auch eine Möglichkeit an die mp3 zu kommen.

                        apollon77 1 Reply Last reply Reply Quote 0
                        • bahnuhr
                          bahnuhr Forum Testing Most Active last edited by bahnuhr

                          ach, mist auch:

                          jetzt hab ichs wieder:

                          sayit.2	2020-07-28 15:17:01.239	debug	(6764) Duration "testxyz": 0
                          sayit.2	2020-07-28 15:17:01.239	error	(6764) File error: Error: EBUSY: resource busy or locked, open 'C:\iobroker\iobroker-data\sayit/sayit.2.say.mp3'
                          sayit.2	2020-07-28 15:16:59.902	debug	(6764) Status code: 200
                          sayit.2	2020-07-28 15:16:59.697	debug	(6764) Cache File C:\iobroker\cache\107eab35c9bd3e4d332655f0ea83ab40.mp3 for "de-DE_CLOUD_Female;testxyz" not found
                          sayit.2	2020-07-28 15:16:59.697	info	(6764) saying: testxyz
                          

                          Ich hatte mal wmp angeklickt.
                          Vielleicht hat wmp die Datei geblockt.

                          1 Reply Last reply Reply Quote 0
                          • apollon77
                            apollon77 @bahnuhr last edited by

                            @bahnuhr Hm ... vllt kopiert er nicht wenn er ein gecachtes File nutzt ... ich schaue mal

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

                              Ääähm ja genau ... Das Copy file" macht er nur um das Ergebnisfile in den Cache zu kopieren das man nicht jedes mal beim gleichen Text das File neu generieren muss.

                              AM End eist die Grundfrage ob da nicht ein gewisses Missverständnis herrscht: Ich glaube das C:\iobroker\iobroker-data\sayit/sayit.2.say.mp3 file ist nie wirklich dazu gedacht genutzt zu werden oder?! Da sist nur ein "Intermediate" FIle und wird ausgegeben. Sonst wird das gecachte File ausgegeben ...

                              bahnuhr 1 Reply Last reply Reply Quote 0
                              • bahnuhr
                                bahnuhr Forum Testing Most Active @apollon77 last edited by

                                @apollon77 sagte in BUG: sayit funktioniert unter win nicht zuverlässig.:

                                Ääähm ja genau ... Das Copy file" macht er nur um das Ergebnisfile in den Cache zu kopieren das man nicht jedes mal beim gleichen Text das File neu generieren muss.

                                Kann man das ändern; und zwar so, dass das mp3 immer erzeugt wird.

                                Habe festgestellt, dass das mp3 auch nicht erzeugt wird, wenn der gleiche Text etwas zurück liegt; und nicht wie gedacht nur das letzte mal.

                                apollon77 1 Reply Last reply Reply Quote 0
                                • apollon77
                                  apollon77 @bahnuhr last edited by

                                  @bahnuhr Ok, dann nochmal: Was willst Du mit exakt diesem File tun? Warum sollte es da sein? Ich glaube wirklich das es um ein fundamentales Missverständnis geht wie der Adapter funktionieren soll.

                                  Der Adapter ist quasi zweigeteilt:
                                  1.) Text to Speech File ... also ein MP3 (nicht unbediengt das sondern ggf auch ein gecachtes auswählen
                                  2.) Ausgabe der Datei. Hier landet es in einem Binary State und wird ggf im browser, per mpd oder Sonos oder whatever ausgegeben.

                                  An sich musst Du nicht an das File ran - und wenn ist denke der saubere Weg es sich aus dem State zu holen.

                                  bahnuhr 1 Reply Last reply Reply Quote 0
                                  • bahnuhr
                                    bahnuhr Forum Testing Most Active @apollon77 last edited by

                                    @apollon77 sagte in BUG: sayit funktioniert unter win nicht zuverlässig.:

                                    Was willst Du mit exakt diesem File tun?

                                    Hatte ich oben schon geschrieben.
                                    Ich möchte eine mp3 kopieren um Sie dann Yamaha musiccast zur Verfügung zu stellen.
                                    Also: Ansage eines Textes über Yamaha Lautsprecher.

                                    Dies funktioniert auch soweit. Nur brauche ich halt zuverlässig die mp3.

                                    @apollon77 sagte in BUG: sayit funktioniert unter win nicht zuverlässig.:

                                    denke der saubere Weg es sich aus dem State zu holen.

                                    Ok, das wäre doch ein Weg. (Du meinst doch dieses Objekt, oder ?: sayit.2.tts.mp3)
                                    Kannst du mir sagen, wie man dies macht. Wenn ich auf den State klicke wird die Datei ja wiedergegeben.
                                    Als konkrete Frage:
                                    Wie speichere ich den Statte als mp3?

                                    mfg
                                    Dieter

                                    sigi234 1 Reply Last reply Reply Quote 0
                                    • sigi234
                                      sigi234 Forum Testing Most Active @bahnuhr last edited by

                                      @bahnuhr sagte in BUG: sayit funktioniert unter win nicht zuverlässig.:

                                      Also: Ansage eines Textes über Yamaha Lautsprecher.

                                      Geht das nicht direkt via XML Command?
                                      Welchen Yamaha Lautsprecher hast du?

                                      bahnuhr 1 Reply Last reply Reply Quote 0
                                      • bahnuhr
                                        bahnuhr Forum Testing Most Active @sigi234 last edited by

                                        @sigi234 sagte in BUG: sayit funktioniert unter win nicht zuverlässig.:

                                        @bahnuhr sagte in BUG: sayit funktioniert unter win nicht zuverlässig.:

                                        Also: Ansage eines Textes über Yamaha Lautsprecher.

                                        Geht das nicht direkt via XML Command?
                                        Welchen Yamaha Lautsprecher hast du?

                                        Text vielleicht.
                                        Sound nein.

                                        Lautsprecher: 10, 20, 30

                                        F 1 Reply Last reply Reply Quote 0
                                        • F
                                          fastfoot @bahnuhr last edited by

                                          @bahnuhr sagte in BUG: sayit funktioniert unter win nicht zuverlässig.:

                                          Wie speichere ich den Statte als mp3?

                                          evtl. musst du noch den timeout anpassen, je nach Länge deines Textes

                                          const fs = require('fs');
                                          const url = 'http://ip:8082/state/sayit.0.tts.mp3';
                                          const outfile = './Test.mp3';
                                          setState('sayit.0.tts.text','Hallo, dies ist ein ziemlich unnützer Text');
                                          setTimeout(function(){
                                              request(url, {encoding:'binary'}, function(error, response, body) {
                                                  fs.writeFile(outfile, body, 'binary', function (err) {
                                                      if(err) log('Fehler!');
                                                  });                
                                              });
                                          }, 2000);
                                          
                                          bahnuhr F 2 Replies Last reply Reply Quote 1
                                          • bahnuhr
                                            bahnuhr Forum Testing Most Active @fastfoot last edited by

                                            @fastfoot sagte in BUG: sayit funktioniert unter win nicht zuverlässig.:

                                            @bahnuhr sagte in BUG: sayit funktioniert unter win nicht zuverlässig.:

                                            Wie speichere ich den Statte als mp3?

                                            evtl. musst du noch den timeout anpassen, je nach Länge deines Textes

                                            const fs = require('fs');
                                            const url = 'http://ip:8082/state/sayit.0.tts.mp3';
                                            const outfile = './Test.mp3';
                                            setState('sayit.0.tts.text','Hallo, dies ist ein ziemlich unnützer Text');
                                            setTimeout(function(){
                                                request(url, {encoding:'binary'}, function(error, response, body) {
                                                    fs.writeFile(outfile, body, 'binary', function (err) {
                                                        if(err) log('Fehler!');
                                                    });                
                                                });
                                            }, 2000);
                                            

                                            Super,cool.
                                            Das probier ich heute abend gleich aus.
                                            Danke.

                                            F 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            712
                                            Online

                                            31.9k
                                            Users

                                            80.1k
                                            Topics

                                            1.3m
                                            Posts

                                            bug sayit
                                            6
                                            95
                                            4608
                                            Loading More Posts
                                            • Oldest to Newest
                                            • Newest to Oldest
                                            • Most Votes
                                            Reply
                                            • Reply as topic
                                            Log in to reply
                                            Community
                                            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                            The ioBroker Community 2014-2023
                                            logo