speechsuper / SpeechSuper-API-Samples

Deep learning based speech and pronunciation assessment API for 8 languages.
MIT License
28 stars 2 forks source link

Sending FormData from NodeJS #3

Closed sjrogers closed 1 month ago

sjrogers commented 1 month ago

I am attempting to send data from a NestJS application to SpeechSuper and having a rather difficult time of it. So far I have not made a successful request to the SpeechSuper API and I have run out of ideas to try.

When I attempt to submit a multipart/form-data request with Axios, regardless of whether I serialize the data manually or simply pass a FormData object, I get a serialization error that appears to be related to the FormData class itself because it occurs even if I do not add anything to the native or form-data-provided FormData object.

However, when I try to use the form-data package's submit method as in the SpeechSuper NodeJS sample, the method does not accept a target URL (only a protocol) and keeps trying to post the data to localhost. In other words the sample given does not appear to work.

How is sending a request from Node supposed to work if the API requires FormData? Is a websocket connection a potential workaround?

Environment info:

sjrogers commented 1 month ago

Issue resolved with Qiusi via email. Apparently related to network configuration.