Zombies machen mehr geräsche und andere tolle sachen und laufen zum spieler

This commit is contained in:
2024-04-07 03:38:32 +02:00
parent 51f9151060
commit b378c4e834
16 changed files with 88919 additions and 28 deletions

View File

@ -54,6 +54,7 @@ public class Text2Speech : MonoBehaviour
private readonly string _shortPrompt = "Write a relatively short text for a Developer as an NPC in a game. The Developer works at a small gamedevelopement office and its manager is called Gottfried who is responsable for all the Developers needs and protection. The text should be based on the following bullet-point context, which describes the events of the last moments. Remember to only respond with the relatively short text that only this ONE Developer should speak and nothing else! The context is: ";
private readonly string _veryShortPrompt = "Write a very short text for a Developer as an NPC in a game. The Developer works at a small gamedevelopement office and its manager is called Gottfried who is responsable for all the Developers needs and protection. The text should be based on the following bullet-point context, which describes the events of the last moments. Remember to only respond with the very short text that only this ONE Developer should speak and nothing else! The context is: ";
private int _shortnessLevel = 0;
void Start()
{
_tmpPath = "tmp_audio_" + GetInstanceID().ToString() + ".wav";
@ -166,7 +167,7 @@ public class Text2Speech : MonoBehaviour
IEnumerator GenerateAndSynthesizeText(string context)
{
var generateTextTask = GenerateTextAsync(context);
var generateTextTask = GenerateText(context);
yield return new WaitUntil(() => generateTextTask.IsCompleted);
@ -181,7 +182,7 @@ public class Text2Speech : MonoBehaviour
}
}
async Task<string> GenerateTextAsync(string context)
async Task<string> GenerateText(string context)
{
Model model = Model.ChatGPTTurbo;