SDiFI / masdif

Manager for Spoken Dialog Framework
Apache License 2.0
1 stars 0 forks source link

Parameter `metadata.tts` ignored #4

Closed rkjaran closed 1 year ago

rkjaran commented 1 year ago

The service seems to ignore (at least) the metadata.tts parameter in PUT /conversations/<id>. These all produce an attachment with type audio (or the exact same output, except for the mp3 URL):

curl` -XPUT -H"Content-Type: application/json" http://localhost:8080/conversations/0478a453-735d-4505-b85e-18b735b54d26  -d'{"text": "Halló, botti", "metadata": {"tts": false}}' | jq
curl` -XPUT -H"Content-Type: application/json" http://localhost:8080/conversations/0478a453-735d-4505-b85e-18b735b54d26  -d'{"text": "Halló, botti", "metadata": {"tts": "false"}}' | jq
curl` -XPUT -H"Content-Type: application/json" http://localhost:8080/conversations/0478a453-735d-4505-b85e-18b735b54d26  -d'{"text": "Halló, botti", "metadata": {"tts": true}}' | jq
curl` -XPUT -H"Content-Type: application/json" http://localhost:8080/conversations/0478a453-735d-4505-b85e-18b735b54d26  -d'{"text": "Halló, botti", "metadata": {"tts": "true"}}' | jq
[
  {
    "recipient_id": "0478a453-735d-4505-b85e-18b735b54d26",
    "text": "Góðan daginn!",
    "data": {
      "attachment": [
        {
          "type": "audio",
          "payload": {
            "src": "http://localhost:8080/rails/active_storage/blobs/proxy/[...].mp3"
          }
        }
      ]
    }
  }
]

Is this not how we are passing metadata? Is it getting dropped somewhere?

lumpidu commented 1 year ago

Fixed via #8