generated from RageAgainstThePixel/upm-template
-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added ability to specify fully customizable domain proxies - Added env var parsing for `ELEVENLABS_API_KEY` - Added Copy Button for the Voice ID to Voice Lab Dashboard - Added Shared Voices API - Added SoundEffects API endpoints - Added Dubbing API endpoints - Updated models - Updated com.utilities.rest -> 2.5.7 --------- Co-authored-by: AmarTrivedi1 <149634562+AmarTrivedi1@users.noreply.github.com>
- Loading branch information
1 parent
2493b06
commit 5060287
Showing
54 changed files
with
1,710 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// Licensed under the MIT License. See LICENSE in the project root for license information. | ||
|
||
using ElevenLabs.Extensions; | ||
using System; | ||
using UnityEngine; | ||
using UnityEngine.Scripting; | ||
|
||
namespace ElevenLabs | ||
{ | ||
[Preserve] | ||
[Serializable] | ||
public class GeneratedClip : ISerializationCallbackReceiver | ||
{ | ||
[Preserve] | ||
internal GeneratedClip(string id, string text, AudioClip audioClip, string cachedPath) | ||
{ | ||
this.id = id; | ||
this.text = text; | ||
TextHash = $"{id}{text}".GenerateGuid(); | ||
textHash = TextHash.ToString(); | ||
this.audioClip = audioClip; | ||
this.cachedPath = cachedPath; | ||
} | ||
|
||
[SerializeField] | ||
private string id; | ||
|
||
[Preserve] | ||
public string Id => id; | ||
|
||
[SerializeField] | ||
private string text; | ||
|
||
[Preserve] | ||
public string Text => text; | ||
|
||
[SerializeField] | ||
private string textHash; | ||
|
||
[Preserve] | ||
public Guid TextHash { get; private set; } | ||
|
||
[SerializeField] | ||
private AudioClip audioClip; | ||
|
||
[Preserve] | ||
public AudioClip AudioClip => audioClip; | ||
|
||
[SerializeField] | ||
private string cachedPath; | ||
|
||
[Preserve] | ||
public string CachedPath => cachedPath; | ||
|
||
public void OnBeforeSerialize() => textHash = TextHash.ToString(); | ||
|
||
public void OnAfterDeserialize() => TextHash = Guid.Parse(textHash); | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.