Devs sprechen jetzt wenn sie was wollen
This commit is contained in:
@ -32,13 +32,13 @@ public class Text2Speech : MonoBehaviour
|
||||
|
||||
private readonly string _googelCloudApiKey = "AIzaSyDNpkVyAUU4AvSwAErVMlZ1lSvGfpkEs0Q";
|
||||
private readonly string _google_CloudApiUrl = "https://texttospeech.googleapis.com/v1/text:synthesize";
|
||||
private readonly string _outputPath = "C:\\Users\\PC\\VoiceTest\\Assets\\Scirpts\\audio.wav";
|
||||
private readonly string _outputPath = "path/to/audio.wav";
|
||||
private string _tmpPath = "tmp_audio.wav";
|
||||
|
||||
private OpenAIAPI _openAiApi;
|
||||
private Conversation? _conversation;
|
||||
private readonly string _openAiApiKey = "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";
|
||||
private readonly string _prompt = "Write a short text for an NPC in a game.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 short text that the ONE NPC should speak! The context is: ";
|
||||
private readonly string _prompt = "Write a short text for an NPC in a game. 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 short text that the ONE NPC should speak! The context is: ";
|
||||
|
||||
void Start()
|
||||
{
|
||||
@ -71,6 +71,12 @@ public class Text2Speech : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
public void Generate(string c)
|
||||
{
|
||||
context = c;
|
||||
generate = true;
|
||||
}
|
||||
|
||||
public void GetRandomGermanVoice(string gender, Action<JToken> callback)
|
||||
{
|
||||
StartCoroutine(GetRandomGermanVoiceCoroutine(gender, callback));
|
||||
|
||||
Reference in New Issue
Block a user