public async Task <IActionResult> CreateGroupPerson(string personGroupId, [FromBody] IMPerson person)
        {
            var newPerson = await this.faceApi.AddPerson(personGroupId, person.FullName);

            //TODO: insert person metadata into DocDb
            return(this.Ok(new Person {
                PersonId = newPerson.PersonId, Name = person.FullName
            }));
        }
Esempio n. 2
0
        public async Task <IMPerson> SaveNewPerson(IMPerson person)
        {
            person.Id = Guid.NewGuid().ToString();

            // Create profile for Face
            var createPersonResult = await this.faceApi.AddPerson(person.FacePersonGroupId, person.FullName);

            person.FacePersonId = createPersonResult.PersonId.ToString();

            // Create profile for voice
            var speakerProfileId = await this.speakerApi.CreateProfile();

            person.SpeakerIdentificationProfileId = speakerProfileId;

            // Save to DB
            await this.repository.CreatePersonDoc(person);

            return(person);
        }
Esempio n. 3
0
        public async Task <IActionResult> UpdatePerson([FromBody] IMPerson person)
        {
            await this.personManager.UpdatePerson(person);

            return(this.Ok(person));
        }
Esempio n. 4
0
        public async Task <IMPerson> UpdatePerson(IMPerson person)
        {
            await this.repository.UpdatePersonDoc(person);

            return(person);
        }