| Author | 
         | 
         
      
        
         
         gg102 Senior Member 
          
 
  Joined: January 29 2013 Location: United States
 Online Status: Offline Posts: 246
          | 
        
         
          
           | Posted: April 20 2015 at 14:27 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Dave,
 
 I'm beginning to see something called Error 35.  I can't seem to narrow down what's causing it, but I know where in my app it's happening.  It seems to be when I call a TTS from a specific macro.  As far as I can tell, all the parameters are correct.  
 
 Can you tell me what Error 35 is so I can further narrow down what's causing it?
 
  
 
 I did try reinstalling all the TTS externals, no joy.
 
 FYI, I'm pretty sure this was happening BEFORE I moved to the RAM disk.
  Edited by gg102 - April 20 2015 at 14:32
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         dhoward Admin Group 
          
  
  Joined: June 29 2001 Location: United States
 Online Status: Offline Posts: 4447
          | 
        
         
          
           | Posted: April 21 2015 at 02:26 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
gg,
 
 This would not be caused by the RAM disk. The error is 
 happening within the TTS call and doesnt have a 
 specific handler so falls back to the error capture in 
 the EXE queue processing.
 
 Basically what is happening is that the TTS engine 
 that is currently active does not like the data that 
 is being passed to it. It may be odd characters or 
 something. It could also possibly be caused by calling 
 the TTS function while the TTS engine is currently 
 busy. I would try modifying the macro to log the text 
 being sent to the engine to see if that is the issue. 
 If there is nothing specifically wrong with the text 
 then its probably how the calls to the engine are 
 being made. Another thing you can try is changing the 
 TTS engine you're currently using. Different engines 
 handle the text differently and what may be an error 
 for one engine works fine with another. This would 
 just be a temporary test to try and rule out a 
 specific issue with the engine vs how the data is 
 being processed within the engine.
 
 Dave.
 
         | 
       
       
        | Back to Top | 
         
          
          
         | 
       
       
       
        |   | 
      
        
         
         gg102 Senior Member 
          
 
  Joined: January 29 2013 Location: United States
 Online Status: Offline Posts: 246
          | 
        
         
          
           | Posted: April 21 2015 at 11:21 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Thank you Dave.
 
 I was suspecting the same.  I've added a debug line in my "SPEECH" macro to test for invalid characters:
 
 if (not(match( "{LAST_TTS}",
 "[^ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz 0123456789.!?%=]" )),
 
 ph_writefile("{LOG_FILE_NAME}",0, today() + " Debug message: Invalid characters in TTS string: "+"{LAST_TTS}"
 + char(13) + char(10) )
 ,
 ph_writefile("{LOG_FILE_NAME}",0, today() + " Debug message: TTS string is valid."
 + char(13) + char(10) )
 )
 
 but more, I'm suspecting I'm overrunning the TTS engine.  When I return home, my house gets rather chatty.  
 If I'm not getting invalid characters, I'll try delaying speech something like:
  ph_delay(len("{last_tts}")*100).
 
 I'll let you know what I discover.
 Thanks.
 
 
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         dhoward Admin Group 
          
  
  Joined: June 29 2001 Location: United States
 Online Status: Offline Posts: 4447
          | 
        
         
          
           | Posted: April 22 2015 at 06:51 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
gg,
 
 Also take a look at the newer ph_tts??? functions. They've been around for a little while but alot of people are unaware of them. In particular you may be interested in the ph_ttssync(), ph_ttswait(), and ph_ttsgetstatus() functions.
 
 Dave.
 
         | 
       
       
        | Back to Top | 
         
          
          
         | 
       
       
       
        |   | 
      
        
         
         gg102 Senior Member 
          
 
  Joined: January 29 2013 Location: United States
 Online Status: Offline Posts: 246
          | 
        
         
          
           | Posted: April 22 2015 at 11:20 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Thanks Dave,
 
 I was not aware of those functions.  They will help.
 
 So far, I have had no invalid characters, and with the canned delay I have had no more overruns.  I'll change it to ph_ttswait(-1).  That would be the proper way to handle the wait.
 
 Thanks Dave.
 
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         gg102 Senior Member 
          
 
  Joined: January 29 2013 Location: United States
 Online Status: Offline Posts: 246
          | 
        
         
          
           | Posted: April 23 2015 at 21:31 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Dave, I've discovered something....
 
 I'm still getting Error 35, sometmes.  
 I test my TTS string for valid characters.  All characters are valid.  
 I look for TTS ready, and it's ready.  I'm still getting the Error.  
 
 I think I've found the problem.  Let me explain a little detail that turns out to be very important.
 
 On my live server, I connect to it via MS remote desktop.  I do this because the server is in a secure location and hard to access.  While I'm "attached" and logged in, the Error 35 never happens; hmmm.  When the local console is attached (logged in), the Error 35 never happens; hmmm.  This makes for an odd situation.  Why do I get the Error 35 sometimes?  
 
 Well, so far what I'm seeing is that if I login using RDP, and later log out/disconnect, but I DON'T re-login to the local console, then the TTS system gives Error 35, and the TTS engine doesn't work properly nor reliably.  This may have to do with the fact that the audio gets redirected to the RDP system, but maybe when I log out but don't reconnect, the audio doesn't know what to do; dangling handles?
 
 I'll keep testing, but so far, this what I'm seeing so far. As they say, "The devil is in the details."
 
 This is a MS problem not a PH issue.
 
 Sincerely,
 Sherlock.
 
 
  Edited by gg102 - April 23 2015 at 22:51
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         dhoward Admin Group 
          
  
  Joined: June 29 2001 Location: United States
 Online Status: Offline Posts: 4447
          | 
        
         
          
           | Posted: April 24 2015 at 06:08 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
gg,
 
 I have exactly the same situation. The PH machine is nearly inaccessible so I always use RDP to interface with it. The PowerHome machine also has its speaker output directed to the paging option of my Russound whold house audio system. Whenever Im done with an RDP session, I always followup with a VNC connection. Otherwise, the TTS alerts never go to my Russound.
 
 When Im RDP'ed in, the TTS alerts come out on the machine that is running the RDP client. The client captures the audio output. When I disconnect, the audio does not get returned to PH computer. Its stuck somewhere in limbo. When I make the connection using VNC, its as if Im logging in at the actual PH machine and this returns the audio capture to normal.
 
 Ive never left it in the "limbo" state but I bet if I did, I would get the same errors you're getting. There is probably a configuration option to NOT capture the audio in the RDP client but I havent bothered to check. I bet it would fix your issue.
 
 Dave.
 
         | 
       
       
        | Back to Top | 
         
          
          
         | 
       
       
       
        |   |