Example #1
0
        //constructor part
        public VoiceObject(string containerID, DORC typeOfVO, string character, string gender, dynamic text)
        {
            this.Ue4DestinationPath = $"/Voices/{typeOfVO}/{containerID}";
            this.FolderName         = containerID;
            this.typeOfVO           = typeOfVO;
            this.character          = character;
            this.gender             = gender;
            this.text = text;

            if (Character == "mc")
            {
                this.voice = "Joey";
            }
            else if (Gender == "M")
            {
                this.voice = "Eric";
            }
            else if (Gender == "F")
            {
                voice = "Salli";
            }
            else
            {
                this.voice = "Eric";
            }
        }
Example #2
0
        public Parser(DORC typeOfVO, bool web)
        {
            if (typeOfVO == DORC.Dialogs)
            {
                if (web)
                {
                    this.collection = GetWebData(Config.dialogURL);
                }

                else
                {
                    this.collection = GetLocalData(Config.jsonLocalSourceDialog);
                }

                this.switcher = typeOfVO;
            }
            else
            {
                if (web)
                {
                    this.collection = GetWebData(Config.commentsURL);
                }
                else
                {
                    this.collection = GetLocalData(Config.jsonLocalSourceComments);
                }
                this.switcher = typeOfVO;
            }
        }
Example #3
0
        static void Main(string[] args)
        {
            DORC currentTask = DORC.Comments;
            bool web         = true;
            bool dev         = false;

            if (args.Length != 0)
            {
                if (args[0] == "-h")
                {
                    Console.WriteLine("Ex: <RootFolder> <ProjectName> <currentTask>");
                    Environment.Exit(0);
                }

                Config setupConfig = new Config(args[0].Replace("\\", "/"), args[1]);

                if (args[2] == "Comments")
                {
                    currentTask = DORC.Comments;
                }
                else if (args[2] == "Dialogs")
                {
                    currentTask = DORC.Dialogs;
                }
                else
                {
                    Console.WriteLine($"{args[2]} must be Comments or Dialogs");
                    Environment.Exit(100500);
                }
                web = true; //if we launch it as final program, with args -> it must use web as a source.
            }
            else if (dev)
            {
                web = false;
            }
            else
            {
                Console.WriteLine("No args, use -h or set args.\nEx: <RootFolder> <ProjectName> <currentTask>");
                Environment.Exit(0);
            }


            Console.WriteLine(Config.commentsURL);
            Console.WriteLine(Config.dialogURL);

            Parser     parser     = new Parser(currentTask, web);
            TXTFactory tXTFactory = new TXTFactory(LANG.EN);
            WAVFactory wAVFactory = new WAVFactory(LANG.EN);
            FBXFactory fBXFactory = new FBXFactory(LANG.EN);

            foreach (var voObj in parser.DoParse())
            {
                if (tXTFactory.Main(voObj))
                {
                    wAVFactory.Main(voObj);
                    fBXFactory.Main(voObj);
                }
            }
        }