react-voice-visualizer
react-voice-visualizer copied to clipboard
Resulting file in Safari is not usable for some APIs
Describe the bug After recording an audio file on Safari, the resulting MP4 provide some issues with usage of some APIs (for my case, it's the transcription of OpenAI). There is more details about this specific use case here: https://community.openai.com/t/whisper-api-completely-wrong-for-mp4/289256/11
To Reproduce Steps to reproduce the behavior:
- Go to A safari browser, and record an audio
- Download the resulting audio, and send it to OpenAI transcribe
curl https://api.openai.com/v1/audio/transcriptions \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: multipart/form-data" \
-F file="@/path/to/file.mp4" \
-F model="whisper-1"
- See that the result is weird
Expected behavior That the audio file work with the API
Screenshots None
Package info (please complete the following information):
- Version 2.2.0
Additional context
A simple solution would be to use the argument of start method line https://github.com/YZarytskyi/react-voice-visualizer/blob/bd9f010c9719ba2fa06152e1f72c5ea1a7d5d4ff/src/hooks/useVoiceVisualizer.tsx#L159
But would result in several event for blob, so maybe not that simple....
Let me know what you think !