GDF Plugin 1.20 and authentication to Dialogflow CX

121 views
Skip to first unread message

Maciej Krzysztoń

unread,
Dec 7, 2021, 1:22:34 PM12/7/21
to UniMRCP
Hello,

I have updated my unimrcp version to be able to use Dialogflow CX, created new credentials and put them in data in place of old config. Now when I try to call the agent this message appear in unimrcp log: 

gRPC Status: Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.

I am specifing my agent, session, location and project in vxml grammar 

'builtin:speech/transcribe?projectId=some-project-name";dialogid=test-session-1;locationId=europe-west1;agentId=869fa107-c209-4137-97c7-629b99e49e27;language=de-DE'

and in umsgdf.xml

   <streaming-recognition
      single-utterance="true"
      interim-results="true"
      start-of-input="service-originated"
      language="de-DE"
      max-alternatives="1"
      project-id="some-project-name"
      skip-unsupported-grammars="true"
      skip-empty-results="true"
      transcription-grammar="transcribe"
      generate-output-audio="false"
      stream-creation-timeout="0"
      grpc-log-redirection="false"
      grpc-log-verbosity="DEBUG"
      grpc-log-trace="all"
      inter-result-timeout="3000"
      api="v3beta1"
   />


When I am using the same data from my java application, authorization and queries are working. However, when I used my old code for authorization (from api v2) the error message was the same as now from unimrcp.


Am I missing something? Is it possible that I get these errors because my unimrcp was updated from the older version?

Kind regards

Maciej Krzyszton 

Maciej Krzysztoń

unread,
Dec 8, 2021, 8:53:49 AM12/8/21
to UniMRCP
Okay, i fixed it with reinstalling the unimrcpserver, gdf-plugin and following umsgdf.xml streaming-recognition 

   <streaming-recognition

      single-utterance="true"

      interim-results="true"
      start-of-input="service-originated"
      language="de-DE"
      max-alternatives="1"

      project-id="some-project-id"


      skip-unsupported-grammars="true"
      skip-empty-results="true"
      transcription-grammar="transcribe"
      generate-output-audio="false"

      word-info="false"
      model=""
      model-variant=""
      environment=""
      stream-creation-timeout="0"
      inter-result-timeout="0"
      grpc-log-redirection="false"
      grpc-log-verbosity=""
      grpc-log-trace=""
      max-recv-message-length="-1"
      max-send-message-length="-1"
      api="v3beta1"
      location="europe-west1"
      service-uri="europe-west1-dialogflow.googleapis.com:443"
   />

and grammar

builtin:speech/transcribe?agentid=some-agent-id;language=de-DE'

Arsen Chaloyan

unread,
Dec 20, 2021, 7:28:58 PM12/20/21
to UniMRCP
Hi Maciej,

You do not have to specify a service-uri explicitly since the service-uri is composed implicitly based on the specified location.

I think your original problem was in the token name used to specify a location as an input parameter to the built-in grammar, which is "location" but not "locationId". So, the following should work as intended, having the default settings in umsgdf.xml.

builtin:speech/transcribe?projectId=some-project-name";dialogid=test-session-1;location=europe-west1;agentId=869fa107-c209-4137-97c7-629b99e49e27;language=de-DE';api=v3beta1


--
You received this message because you are subscribed to the Google Groups "UniMRCP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to unimrcp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/unimrcp/4f6fe68a-a53e-466d-9d0e-9e887a65ba61n%40googlegroups.com.


--
Arsen Chaloyan
Author of UniMRCP
http://www.unimrcp.org
Reply all
Reply to author
Forward
0 new messages