Closed seanmtracey closed 6 years ago
Although the service provides an API to retrieve all models that it supports, it doesn't; provide an API to retrieve all audio formats that it supports.
So IMHO the way to tackle this would be to allow a msg.audioformat
override.
... but on second thoughts. The node performs a check on the extension from a fileType
check. We could add in configuration option to disable the fileType check.
.. which would have to default to false. ie by default perform the fileType check.
Doesn't the STT service return an error when an unexpected data format / malformed request is made?
Instead of checking ahead of time and trying to decide whether or not we should make the request, could we just return any error message the server gives us (which I hope would say something like 'invalid format') to the user?
This way, instead of there being two checks to decide whether or not the file is valid (that may not necessarily agree) there would be only one which would always be correct.
Good point, however, the nodes do get use on devices, and the extra validation we do before sending large amounts of invalid data over the network to the Watson gateway, may save frustration.
Option of switching off format pre-checks implemented in 0.6.11
Currently, the STT node accepts WAV, MP3, OGG, and FLAC, but the STT service now accepts more formats than this.
Are the formats hard coded into the Node? If so, could we pass up any input to the STT service and let it decide whether or not is valid, and then handle the response? This would save us having to update the STT node as the service adds/removes formats.