KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Using UserProfile and GitHub to sync your Vocola voice commands across computers
Topic Summary:
Created On: 07/03/2020 08:58 AM
Status: Post and Reply
Linear : Threading : Single : Branch
 07/03/2020 08:58 AM
User is offline View Users Profile Print this message

Author Icon
Anders
New Member

Posts: 18
Joined: 10/03/2017

My main PC died, and in the course of setting up my new box -- and scrambling to update my backup laptop -- I discovered that there's a simple way to set up both boxes so you can easily sync Vocola commands between them.  Here's what you need to do:

 

A. Use GitHub to sync your voice command files

 

1) if you aren't already using GitHub, create a free account and download GitHub Desktop, which makes it ridiculously easy to use GitHub on Windows

 

2) Create a new GitHub "repo" where you'll store your Vocola command files.  If you're nervous about folks being able to see your commands, make your repo private.

 

3) "Clone" the repo, which puts a copy of the repo on your PC; unless you're already a heavy GitHub user, use GitHub Desktop to do this cause it's easy.  When you clone it, make sure to save it in the default place where GitHub stores repos on a PC, in a folder called GitHub in your Documents folder.

 

4) Copy your Vocola command files into the folder containing your repo on your PC.

 

5) Use the Natlink config program to tell Vocola that your voice commands are stored in that folder

 

6) Sync your repo with GitHub.  The easiest way to do this using GitHub Desktop.

 

7) Clone your repo on your other computer, then use the Natlink configure program to tell Vocola to use the new repo folder as its voice commands folder.

 

Now whenever you add/delete/change a command on one computer, just sync your voice commands repo with GitHub on the computer where you changed the commands, then sync your other PC(s) with the new version of the repo, and you're set!  Once you've done this a few times, you'll be able to do the whole syncing dance in a minute or less.  And as an added bonus, your commands are now backed up -- and under version control, so if you delete some commands and want them back 6 months from now, it's easy to do.

 


B.  Change your file paths to use %USERPROFILE%

 

The good news: your commands are now easily synced.  The bad news: most voice commands that use a file path is probably now broken.  Why?  Because odds are you don't have the same user name on all your PCs.  For ex, I'm "Anders" on one machine, "aschn" on another, and my work PC -- back when we worked in the office -- was "Aschneid."  So if, for example, you backup your documents using Dropbox, any command using a folder in Dropbox might look like "c:/Anders/Dropbox/....." on one box and "c:/aschn/DropBox...." on the other.

 

How do you fix this?  Replace "c:/Anders/..." with "%USERPROFILE%/...".  Sync the change on all your boxes, and you're all set!

 

 

if you're making this change, now is also probably a good time to:

 

- change any commands that use folders to pull from a common list in a .vch file that you can include in any voice command file (if you haven't done so in the past, which I'd done for almost all my commands but not all of em)

 

- Change your Vocola default text editor to something more powerful than Notepad, such as the free & awesome Visual Studio Code.  To do this, go to your voice command file folder, right click on a .vcl file, choose Other, then pick your new editor and click the checkbox that associates this editor with the .vcl extension.  Then do the same thing w .vch.  Now if you want to check to make sure you don't have any file paths that'll break, you can easily search across all of your voice commands in that folder.

 

Hope this is helpful!  



 07/03/2020 12:39 PM
User is offline View Users Profile Print this message

Author Icon
PG LTU
Top-Tier Member

Posts: 2072
Joined: 03/21/2007

+1 Thx.

You got me thinking about managing my Dragon scripts through the Data Distribution tool and a symbolic link to the cloned local Repo folder. I'm not sure there is much of an advantage over say a Dropbox or OneDrive type sync'd folder (sync'd to each pc) in such a case though since the DDT distributes the commands only one way (into the profile mycmds file). For example, my .vcl and .vch files are already shared in a OneDrive folder and so is my current DDT folder so the sync between pcs is automatic (and the backup is also always there on the web). Maybe I might put the Repo folder in the OneDrive to begin with and use GIT for version control? I dunno, there's just me using this stuff as needed and discarding no longer used stuff periodically and not caring too much about it except in the moment I need it. I have wished I had something from the past that I used to use and have looked through old profiles to find it, but usually, I could just recreate it in the time it takes to look. As I said, you got me thinking . . .

-------------------------




PG





Remember folks, my comments and this forum are for entertainment value only, please, no wagering or other reliance on the contents herein.  I permit no commercial use of my ideas (whether expressions or embodiments) without my written consent.

 07/04/2020 02:44 AM
User is offline View Users Profile Print this message

Author Icon
kkkwj
Top-Tier Member

Posts: 497
Joined: 11/05/2015

In my experience, it's usually not a good idea (not reliable + other problems) to use Dropbox or OneDrive (seems esp flakey) to use them to sync files like Dragon profile (audio, etc.) files that change regularly. Those solutions have timestamp issues that underly synchronization issues. They can eventually get the files synchronized if the files are left alone for sufficient time if there are not too many collisions between modified files on different machines. But for small XML Dragon command files, that method should be ok (conflicting modifications excepted).


In contrast, you'd be far better off to use local or remote repositories for Git or Subversion, and checkout/checkin when you explicitly want to sync your files. That's a far more reliable solution for everything from small ASCII to large binary files.

-------------------------

Win10/x64, AMD Ryzen 7 3700X, 64GB RAM, Dragon 15.3, SP 6 PRO, SpeechStart, Office 365, KB 2017, Dragon Capture, Samson Meteor USB Desk Mic, Klim and JUKSTG earbuds with microphones

 07/04/2020 07:21 PM
User is offline View Users Profile Print this message

Author Icon
Lunis Orcutt
Top-Tier Member

Posts: 37997
Joined: 10/01/2006

Originally posted by: kkkwj In my experience, it's usually not a good idea (not reliable + other problems) to use Dropbox or OneDrive (seems esp flakey) to use them to sync files like Dragon profile (audio, etc.) files that change regularly.


We also recommend against regularly using a cloud profile. The Dragon user profile is so large that sooner or later, corruption will happen. It's not if but when. 

Alternative solution: Move your user profile to a flash drive and fasten your flash drive to your keychain, so you won't accidentally forget it. The flash drive approach (poor man's Roaming user profile) has several advantages which include faster to load, less prone to corruption, not subject to the Internet going down or Korea, China, Russia etc trying to break in. HOWEVER, you cannot fully trust a flash drive either. They are easy to lose and slightly prone to corruption. Just remember to make frequent profile backups to the cloud. 



-------------------------

Forum Mission Statement
Trial Downloads
Dragon/Sales@KnowBrainer.com 
(615) 884-4558 ext 1

 07/04/2020 05:26 PM
User is offline View Users Profile Print this message


mdl
Top-Tier Member

Posts: 817
Joined: 04/18/2009

note that within Vocola commands you can use environment variables via Env.Get and the like to deal with many computer differences

I don't have a great answer yet for different screen sizes across computers; I just used
#include "environment_$COMPUTERNAME.vch"
and made a seperate include file for each computer with the hard to fetch parameters that differ
 07/05/2020 10:02 PM
User is offline View Users Profile Print this message

Author Icon
kkkwj
Top-Tier Member

Posts: 497
Joined: 11/05/2015

I'm with Lunis on the flash drive method. That's how I move profiles when I want to move them. Easy, fast, reliable, etc. I also make sure to export my custom words and commands regularly to a network drive or Dropbox/OneDrive. Those small files synchronize properly and can be reliably imported when necessary.



-------------------------

Win10/x64, AMD Ryzen 7 3700X, 64GB RAM, Dragon 15.3, SP 6 PRO, SpeechStart, Office 365, KB 2017, Dragon Capture, Samson Meteor USB Desk Mic, Klim and JUKSTG earbuds with microphones

 07/19/2020 03:57 AM
User is offline View Users Profile Print this message

Author Icon
alexander
Senior Member

Posts: 156
Joined: 07/31/2016

Originally posted by: mdl note that within Vocola commands you can use environment variables via Env.Get and the like to deal with many computer differences I don't have a great answer yet for different screen sizes across computers; I just used #include "environment_$COMPUTERNAME.vch" and made a seperate include file for each computer with the hard to fetch parameters that differ

 

fwiw I broke down and starting doing screen related stuff in the vocola extension .py files.  Hacking with win32

 

Also have some files from the machine specific commands: "Edit global machine commands".  Then I set each one up slightly differently w/ vch includes:

 

include machinecommon.vch

include machine_numberonedefs.vch

include machine_commands.vch. # will use defs in above 2 files.

 

 07/06/2020 09:51 AM
User is offline View Users Profile Print this message

Author Icon
PG LTU
Top-Tier Member

Posts: 2072
Joined: 03/21/2007

If you have to use a sync'd Dropbox or OneDrive to put your roaming profiles in (DPG), there is a setting to "Access network at user profile open/close only" which rids file change churn. You still need to make sure you don't turn off your pc too soon, or try to open a profile before the background sync occurs on a new machine, but there you go, if you have to . . .

-------------------------




PG





Remember folks, my comments and this forum are for entertainment value only, please, no wagering or other reliance on the contents herein.  I permit no commercial use of my ideas (whether expressions or embodiments) without my written consent.

Statistics
31793 users are registered to the KnowBrainer Speech Recognition forum.
There are currently 2 users logged in.
The most users ever online was 12124 on 09/09/2020 at 04:59 AM.
There are currently 695 guests browsing this forum, which makes a total of 697 users using this forum.

FuseTalk Standard Edition v4.0 - © 1999-2020 FuseTalk™ Inc. All rights reserved.