Thanks for your time checking my post.
In my Django project I created an API which is supposed be to trigged in view function where it runs the most recent deepspeech version (DeepSpeech: v0.9.3-0).
Even though there is no problem with the backend and the request I sent from Insomnia is received from the server, and I have the latest TF version installed, I encounter the error below:
linux@linux:~/docs/PROJECT$ cd /home/linux/docs/PROJECT ; /usr/bin/env /home/linux/docs/PROJECT/env_/bin/python /home/linux/.vscode/extensions/ms-python.debugpy-2024.6.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher 60057 -- /home/linux/docs/PROJECT/PROJECT/manage.py runserver 8001
Watching for file changes with StatReloader
Performing system checks...
System check identified no issues (0 silenced).
May 13, 2024 - 03:49:36
Django version 4.2.13, using settings 'PROJECT.settings'
Starting development server at http://127.0.0.1:8001/
Quit the server with CONTROL-C.
TensorFlow: v2.3.0-6-g23ad988
DeepSpeech: v0.9.3-0-gf2e9c85
ERROR: Model provided has model identifier 'u/3�', should be 'TFL3'
Error at reading model file PROJECT/files/deep_speech_models/deepspeech-0.9.3-models.pbmm
Error initializing DeepSpeech model: CreateModel failed with 'Failed to initialize memory mapped model.' (0x3000)
Below is the relevant part of my view function code where the error occurs:
class ModifyNarrativeAPIView(APIView):
permission_classes = [permissions.IsAuthenticated]
def post(self, request, *args, **kwargs):
voice_files = paths.saved_sound_files
ear = Ear(DEEPSPEECH_MODEL_PATH, DEEPSPEECH_SCORER_PATH)
for voice_file in voice_files:
text = ear.convert_voice_to_text(voice_file)
...
Thanks again.