Fix transcription bug.
This commit is contained in:
parent
aa108a3df4
commit
5e097278ce
@ -180,9 +180,6 @@ Tree("05_Tutorial") {
|
|||||||
BTC.SetVoiceName("it-IT-FabiolaNeural")
|
BTC.SetVoiceName("it-IT-FabiolaNeural")
|
||||||
BTC.SynthesizeText("Cosa ti piace di più? Spaghetti, pizza o risotto?")
|
BTC.SynthesizeText("Cosa ti piace di più? Spaghetti, pizza o risotto?")
|
||||||
BTC.SpeechOutputEnded()
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
BTC.SetSpeechRecognitionLanguage("de-DE")
|
|
||||||
BTC.SetVoiceName("de-DE-SeraphinaMultilingualNeural")
|
|
||||||
BTC.Show("GO.HINTS.SpeakHint")
|
BTC.Show("GO.HINTS.SpeakHint")
|
||||||
|
|
||||||
BTC.AddPossbileSpeechIntent("Zugabteil-Tutorial-U-15")
|
BTC.AddPossbileSpeechIntent("Zugabteil-Tutorial-U-15")
|
||||||
@ -199,6 +196,8 @@ Tree("05_Tutorial") {
|
|||||||
// -- Selector 1: Intent erkannt
|
// -- Selector 1: Intent erkannt
|
||||||
Composite(Sequence) {
|
Composite(Sequence) {
|
||||||
BTC.SpeechIntentRecognized()
|
BTC.SpeechIntentRecognized()
|
||||||
|
BTC.SetSpeechRecognitionLanguage("de-DE")
|
||||||
|
BTC.SetVoiceName("de-DE-SeraphinaMultilingualNeural")
|
||||||
|
|
||||||
// Intent erkannt
|
// Intent erkannt
|
||||||
Composite(Race) {
|
Composite(Race) {
|
||||||
@ -239,6 +238,9 @@ Tree("05_Tutorial") {
|
|||||||
BTC.Show("GO.HANDMENU.Option3Button")
|
BTC.Show("GO.HANDMENU.Option3Button")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BTC.SetSpeechRecognitionLanguage("de-DE")
|
||||||
|
BTC.SetVoiceName("de-DE-SeraphinaMultilingualNeural")
|
||||||
|
|
||||||
Composite(Race) {
|
Composite(Race) {
|
||||||
Composite(Sequence) {
|
Composite(Sequence) {
|
||||||
// Spaghetti
|
// Spaghetti
|
||||||
@ -290,6 +292,8 @@ Tree("05_Tutorial") {
|
|||||||
BTC.AbortSpeechEventListener()
|
BTC.AbortSpeechEventListener()
|
||||||
BTC.StopSpeechIntentRecognition()
|
BTC.StopSpeechIntentRecognition()
|
||||||
BTC.ClearPossbileSpeechIntents()
|
BTC.ClearPossbileSpeechIntents()
|
||||||
|
BTC.SetSpeechRecognitionLanguage("de-DE")
|
||||||
|
BTC.SetVoiceName("de-DE-SeraphinaMultilingualNeural")
|
||||||
|
|
||||||
Composite(Sequence) {
|
Composite(Sequence) {
|
||||||
Composite(Marathon) {
|
Composite(Marathon) {
|
||||||
|
|||||||
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 8f4c1440ae5ec414dbc7d3a5c54dda6b
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -1 +1 @@
|
|||||||
2025-08-04T16:03:18.8396148Z
|
2026-05-05T11:47:25.7382830Z
|
||||||
5
Viagg-io/Assets/afca/ViaggioAI/Scripts/AIServices/SpeechRecognitionService.cs
Executable file → Normal file
5
Viagg-io/Assets/afca/ViaggioAI/Scripts/AIServices/SpeechRecognitionService.cs
Executable file → Normal file
@ -143,9 +143,12 @@ public class SpeechRecognitionService : MonoBehaviour
|
|||||||
#region Framework Functions
|
#region Framework Functions
|
||||||
|
|
||||||
void OnEnable()
|
void OnEnable()
|
||||||
|
{
|
||||||
|
if (this.speechConfig == null)
|
||||||
{
|
{
|
||||||
this.initialize(this.initialRecognitionLanguageCode);
|
this.initialize(this.initialRecognitionLanguageCode);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
@ -286,7 +289,7 @@ public class SpeechRecognitionService : MonoBehaviour
|
|||||||
this.speechConfig.SpeechRecognitionLanguage = languageCode;
|
this.speechConfig.SpeechRecognitionLanguage = languageCode;
|
||||||
|
|
||||||
string micName = (Microphone.devices != null && Microphone.devices.Length > 0) ? Microphone.devices[0] : "<none>";
|
string micName = (Microphone.devices != null && Microphone.devices.Length > 0) ? Microphone.devices[0] : "<none>";
|
||||||
this.logIfInDebugMode($"SpeechRecognitionService initialized using microphone: {micName}");
|
this.logIfInDebugMode($"SpeechRecognitionService initialized using microphone: {micName} and languageCode {languageCode}");
|
||||||
|
|
||||||
this.SpeechRecognitionState = ESpeechRecognitionState.Ready;
|
this.SpeechRecognitionState = ESpeechRecognitionState.Ready;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -144,6 +144,7 @@ public class ViaggioAIManager : MonoBehaviour
|
|||||||
|
|
||||||
public void SetSpeechRecognitionLanguage(string languageCode)
|
public void SetSpeechRecognitionLanguage(string languageCode)
|
||||||
{
|
{
|
||||||
|
this.LogIfInDebugMode($"ViaggioAIManager: Set speech language to {languageCode}");
|
||||||
this.SpeechRecognitionService.SetRecognitionLanguage(languageCode);
|
this.SpeechRecognitionService.SetRecognitionLanguage(languageCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user