Now that we have the required dependencies, we will update the routes. To work with Cloud Speech API, we are going to add only one route that will accept a file, process it, and respond based on the response from Cloud Speech API. Update server/routes/cloud-ai-api.ts and add the upload-audio route, as shown here:
// SNIPP SNIPP
router.post('/upload-image/:threadId', Authenticate, Authorize('user'), upload.single('image-reply'), cloudAIAPI.uploadImage);
router.post('/upload-video/:threadId', Authenticate, Authorize('user'), upload.single('video-reply'), cloudAIAPI.uploadVideo);
router.post('/upload-audio/:threadId', Authenticate, Authorize('user'), upload.single('audio-reply'), cloudAIAPI.uploadAudio);
// SNIPP SNIPP