sepinf-inc / IPED

IPED Digital Forensic Tool. It is an open source software that can be used to process and analyze digital evidence, often seized at crime scenes by law enforcement or in a corporate investigation by private examiners.
Other
886 stars 211 forks source link

Audio Transcript Task not work! #2071

Closed Giak1234 closed 5 months ago

Giak1234 commented 5 months ago

Good morning, I am trying some tests with IPEAD, which works, except for transcribing audio files. Any suggestions to solve the problem @lfcnassif ? Tnk

lfcnassif commented 5 months ago

What IPED version are you using? Have you changed the default Vosk transcription algorithm? Could you share a processing log?Could you provide a step by step to reproduce the problem?

Giak1234 commented 5 months ago

In order: Thanks Luis ... the version is 4.1.5 ... i did not perform any setup ... can you guide me?

Audio

IPED.log

lfcnassif commented 5 months ago

You simply need to set enableAudioTranscription = true into IPEDConfig.txt. The language is taken from locale into LocalConfig.txt. The default Vosk algorithm is not good, you may want to change it, see the steps on #1822.

Giak1234 commented 5 months ago

Luis ... use a PC with proxy (error log) ... is possible bypass the connection to https://huggingface.co ?

Error.txt

Giak1234 commented 5 months ago

I'm settings (decomment) only: implementationClass = iped.engine.task.transcript.Wav2Vec2TranscriptTask and in Local Wav2Vec2TranscriptTask options or huggingFaceModel = jonatasgrosman/wav2vec2-xls-r-1b-english or huggingFaceModel = jonatasgrosman/wav2vec2-large-xlsr-53-english

Giak1234 commented 5 months ago

I forgot where (into AudioTranscriptConfig.txt) ... i didn't download the Vosk file (https://alphacephei.com/vosk/models) :-(

lfcnassif commented 5 months ago

Luis ... use a PC with proxy (error log) ... is possible bypass the connection to https://huggingface.co ?

Error.txt

If you can't disable your proxy, you should configure it in your command line before running IPED: https://stackoverflow.com/questions/11726881/how-to-set-an-http-proxy-in-python-2-7

lfcnassif commented 5 months ago

I forgot where (into AudioTranscriptConfig.txt) ... i didn't download the Vosk file (https://alphacephei.com/vosk/models) :-(

We already distribute Vosk models for English and Portuguese. If you want to transcribe a different language, you should download it manually from the official Vosk page and put it into the appropriate folder into iped/models folder.

Giak1234 commented 5 months ago

Luis good morning and thank you for your time! I did more tests by adding an AD1 with audios (m4a, mp3 and oga) in it and with my current setup I got both English and Italian language transcription but only Opus files (Audio:xmpDM:audioSampleRate 16.000) while mp3 files (Audio:xmpDM:audioSampleRate 48.000) nothing! I will summarize my current file setup:

IPEDConfig.txt ---- enableAudioTranscription = true LocalConfig.txt ---- locale = en-IT

In the conf\AudioTranscriptConfig.txt file

AudioTranscriptConfig.txt

I left everything default except uncommenting the two entries huggingFaceModel = jonatasgrosman/wav2vec2-large-xlsr-53-italian and huggingFaceModel = jonatasgrosman/wav2vec2-xls-r-1b-italian ... in models\vosk I installed the file downloaded from https://alphacephei.com/vosk/models/vosk-model-it-0.22.zip and renamed it-IT. What setup should I follow to transcribe other audio file extensions? I take this opportunity to ask you about the setup to transcribe also from video files in the various formats ... thank you very much for your patience.

lfcnassif commented 5 months ago

What setup should I follow to transcribe other audio file extensions? I take this opportunity to ask you about the setup to transcribe also from video files in the various formats

In AudioTranscriptConfig.txt, just set mimesToProcess = audio; video so you will transcribe any audio and video formats.

LocalConfig.txt ---- locale = en-IT

This setup is wrong, use en or it-IT.

I left everything default except uncommenting the two entries huggingFaceModel = jonatasgrosman/wav2vec2-large-xlsr-53-italian and huggingFaceModel = jonatasgrosman/wav2vec2-xls-r-1b-italian ...

Just uncomment one of them, if you uncomment both, the last one overwrites the first. Anyway this configuration only works if you also uncomment: implementationClass = iped.engine.task.transcript.Wav2Vec2TranscriptTask

Otherwise the worse Vosk algorithm will be used.

in models\vosk I installed the file downloaded from https://alphacephei.com/vosk/models/vosk-model-it-0.22.zip and renamed it-IT

This is needed just if you really want to use the worse Vosk algorithm, but actually you should unzip the downloaded file and put it in a folder named models\vosk\it-IT

Giak1234 commented 5 months ago

In AudioTranscriptConfig.txt, just set mimesToProcess = audio; video so you will transcribe any audio and video formats.

done!

This setup is wrong, use en or it-IT.

not work en-IT only en or it-IT!

Just uncomment one of them, if you uncomment both, the last one overwrites the first. Anyway this configuration only works if you also uncomment: implementationClass = iped.engine.task.transcript.Wav2Vec2TranscriptTask

if I uncomment this line, over this implementationClass = iped.engine.task.transcript.VoskTranscriptTask, i get many errors (attached file) error-en-IT.txt

This is needed just if you really want to use the worse Vosk algorithm, but actually you should unzip the downloaded file and put it in a folder named models\vosk\it-IT

already done!

lfcnassif commented 5 months ago

if I uncomment this line, over this implementationClass = iped.engine.task.transcript.VoskTranscriptTask, i get many errors (attached file) error-en-IT.txt

Seems a network or proxy issue to me. I'll be able to test in a couple of hours.

Giak1234 commented 5 months ago

Thanks :-)

lfcnassif commented 4 months ago

Sorry for my delay, just tested implementationClass = iped.engine.task.transcript.Wav2Vec2TranscriptTask with the italian models, it worked fine. You should see something similar to this in your terminal: image image

Above means the model was downloaded fine. As I said, I think you are having a proxy issue.

If you can't disable your proxy, you should configure it in your command line before running IPED: https://stackoverflow.com/questions/11726881/how-to-set-an-http-proxy-in-python-2-7

As I suggested above, try to set the proxy on your command line before running IPED:

set http_proxy=http://proxy.myproxy.com
set https_proxy=https://proxy.myproxy.com