[NUI] Fix SVACE defects
authordongsug.song <dongsug.song@samsung.com>
Wed, 24 Jul 2024 03:50:59 +0000 (12:50 +0900)
committerJiyun Yang <ji.yang@samsung.com>
Wed, 21 Aug 2024 06:10:37 +0000 (15:10 +0900)
src/Tizen.AIAvatar/src/Lipsync/LipSyncer.cs
src/Tizen.AIAvatar/src/Lipsync/VowelConverter/VowelConverter.cs

index 8a5fc8fb47ec3c7289159c5b7e0563a646c9eff7..b929ae89aa6a7dfb03b3e792f9f082f3b8b85f92 100644 (file)
@@ -132,13 +132,16 @@ namespace Tizen.AIAvatar
         {
             DestroyLipAnimation();
             var lipKeyFrames = CreateKeyFrame(audio, sampleRate);
-            var lipAnimation = CreatedKeyFrameAnimation?.Invoke(lipKeyFrames, false);
-            if (lipAnimation != null)
+            if (lipKeyFrames != null)
             {
-                ResetLipAnimation(lipAnimation);
-                PlayLipAnimation();
+                var lipAnimation = CreatedKeyFrameAnimation?.Invoke(lipKeyFrames, false);
+                if (lipAnimation != null)
+                {
+                    ResetLipAnimation(lipAnimation);
+                    PlayLipAnimation();
+                }
+                audioPlayer.Play(audio, sampleRate);
             }
-            audioPlayer.Play(audio, sampleRate);
         }
 
         private void PlayLipSync(string path)
index 0b65da254654c0e01c9f4c79432ab034cde267fd..c18bded2efb463f29ceecb50e0533434c652d776 100644 (file)
@@ -40,13 +40,20 @@ namespace Tizen.AIAvatar
         {
             vowelClassifier = GetVowelClassifier(sampleRate);
 
-            if (isMic)
+            if (vowelClassifier != null)
             {
-                return animationConverter.ConvertVowelsToAnimationMic(vowels, vowelClassifier.GetStepTime());
+                if (isMic)
+                {
+                    return animationConverter.ConvertVowelsToAnimationMic(vowels, vowelClassifier.GetStepTime());
+                }
+                else
+                {
+                    return animationConverter.ConvertVowelsToAnimation(vowels, vowelClassifier.GetStepTime());
+                }
             }
             else
             {
-                return animationConverter.ConvertVowelsToAnimation(vowels, vowelClassifier.GetStepTime());
+                return null;
             }
         }