Open yassinerebas opened 4 months ago
Try python 3.9
On Thu, Mar 28, 2024, 4:45 AM yassinerebas @.***> wrote:
[youtube] kdvc9Orfk-E: Downloading webpage [youtube] kdvc9Orfk-E: Downloading ios player API JSON [youtube] kdvc9Orfk-E: Downloading android player API JSON [youtube] kdvc9Orfk-E: Downloading m3u8 information [info] kdvc9Orfk-E: Downloading 1 format(s): 251 [download] Destination: E:\transcribe-main\downloads\kdvc9Orfk-E.webm [download] 100% of 14.39MiB in 00:00:05 at 2.47MiB/s [ExtractAudio] Destination: E:\transcribe-main\downloads\kdvc9Orfk-E.wav Deleting original file E:\transcribe-main\downloads\kdvc9Orfk-E.webm (pass -k to keep) Transcribing file: E:\transcribe-main\downloads\0URr_XkgAIE.wav Local files: 0%| | 0/1 [00:00<?, ?it/s] URLs or local paths: 0%| | 0/1 [00:00<?, ?it/s] Traceback (most recent call last): File "E:\transcribe-main\transcribe.py", line 126, in main() File "E:\transcribe-main\transcribe.py", line 95, in main transcribe_file(audio_file, language_sign) File "E:\transcribe-main\transcribe.py", line 85, in transcribe_file progress = deque(farrigh(config), maxlen=0) File "C:\Users\Ingecys\AppData\Local\Programs\Python\Python310\lib\site-packages\tafrigh\cli.py", line 94, in farrigh for progress_info, local_elements_segments in process_local(file_or_folder, model, config, progress_info): File "C:\Users\Ingecys\AppData\Local\Programs\Python\Python310\lib\site-packages\tafrigh\cli.py", line 151, in process_local wav_file_path = str(wit_file_utils.convert_to_wav(file['file_path']).absolute()) NameError: name 'wit_file_utils' is not defined. Did you mean: 'file_utils'?
— Reply to this email directly, view it on GitHub https://github.com/marouane53/transcribe/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAT3QSHASOZTDBDB3J6AXL3Y2PYDHAVCNFSM6AAAAABFMUABJGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGIYTGMBRGI3TMNQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
looks like you need to import wit_file_utils
from tafrigh.utils.wit
try my fork here : https://github.com/odnar-dev/transcribe
The difference in behavior could be due to variations in the runtime environment or Tafrigh library version. The added import statement in your fork might have resolved an issue specific to your setup. If the original code works without the import, it may not be necessary. Code behavior can be influenced by factors like library versions and dependencies.
On Thu, Mar 28, 2024, 12:46 PM odnar-dev @.***> wrote:
looks like you need to import wit_file_utils from tafrigh.utils.wit try my fork here : https://github.com/odnar-dev/transcribe
— Reply to this email directly, view it on GitHub https://github.com/marouane53/transcribe/issues/1#issuecomment-2025984751, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAT3QSFXCZATQJAJV5KPEFDY2RXQJAVCNFSM6AAAAABFMUABJGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRVHE4DINZVGE . You are receiving this because you commented.Message ID: @.***>
i had the same problem, using python 3.11.8 and in a new environment
after doing some digging on how tafrigh work, i found this
by using some magic called debugging i found that they try to import two back-ends : WitRecognizer , WhisperRecognizer
and if one failed to import they just skip it,
so when they try to import WitRecognizer, which fail because of a missing dependency pydub
, they skip importing wit_file_utils
and when your script call the client, it throw the NameError, cause wit_file_utils
which is not defined look alot like file_utils
pydub
this is a list of all the dependencies that are related to tafrigh and needed : pydub, scipy, auditok, numpy, requests
or just install tafrigh with : pip install "tafrigh[wit]"
which install tafrigh with all dependencies that are related to WitRecognizer
Thank you, guys, it worked
i had the same problem, using python 3.11.8 and in a new environment
after doing some digging on how tafrigh work, i found this
by using some magic called debugging i found that they try to import two back-ends : WitRecognizer , WhisperRecognizer and if one failed to import they just skip it, so when they try to import WitRecognizer, which fail because of a missing dependency
pydub
, they skip importingwit_file_utils
and when your script call the client, it throw the NameError, causewit_file_utils
which is not defined look alot likefile_utils
- so all you need to do to fix this is : install
pydub
this is a list of all the dependencies that are related to tafrigh and needed :
pydub, scipy, auditok, numpy, requests
or just install tafrigh with :
pip install "tafrigh[wit]"
which install tafrigh with all dependencies that are related to WitRecognizer
i had the same problem, using python 3.11.8 and in a new environment
after doing some digging on how tafrigh work, i found this
by using some magic called debugging i found that they try to import two back-ends : WitRecognizer , WhisperRecognizer and if one failed to import they just skip it, so when they try to import WitRecognizer, which fail because of a missing dependency
pydub
, they skip importingwit_file_utils
and when your script call the client, it throw the NameError, causewit_file_utils
which is not defined look alot likefile_utils
- so all you need to do to fix this is : install
pydub
this is a list of all the dependencies that are related to tafrigh and needed :
pydub, scipy, auditok, numpy, requests
or just install tafrigh with :
pip install "tafrigh[wit]"
which install tafrigh with all dependencies that are related to WitRecognizer
Amazing work. Thank you
if i want to use it in colab how i do, because i try it and doesn't work.
pip install "tafrigh[wit]" worked for me, thanks @odnar-dev ;)
if i want to use it in colab how i do, because i try it and doesn't work.
Tafrigh is already available on Colab: https://tafrigh.ieasybooks.com.
Tafrigh now is available through Docker with pre-built images, check the docs.
[youtube] kdvc9Orfk-E: Downloading webpage [youtube] kdvc9Orfk-E: Downloading ios player API JSON [youtube] kdvc9Orfk-E: Downloading android player API JSON [youtube] kdvc9Orfk-E: Downloading m3u8 information [info] kdvc9Orfk-E: Downloading 1 format(s): 251 [download] Destination: E:\transcribe-main\downloads\kdvc9Orfk-E.webm [download] 100% of 14.39MiB in 00:00:05 at 2.47MiB/s [ExtractAudio] Destination: E:\transcribe-main\downloads\kdvc9Orfk-E.wav Deleting original file E:\transcribe-main\downloads\kdvc9Orfk-E.webm (pass -k to keep) Transcribing file: E:\transcribe-main\downloads\0URr_XkgAIE.wav Local files: 0%| | 0/1 [00:00<?, ?it/s] URLs or local paths: 0%| | 0/1 [00:00<?, ?it/s] Traceback (most recent call last): File "E:\transcribe-main\transcribe.py", line 126, in
main()
File "E:\transcribe-main\transcribe.py", line 95, in main
transcribe_file(audio_file, language_sign)
File "E:\transcribe-main\transcribe.py", line 85, in transcribe_file
progress = deque(farrigh(config), maxlen=0)
File "C:\Users\Ingecys\AppData\Local\Programs\Python\Python310\lib\site-packages\tafrigh\cli.py", line 94, in farrigh
for progress_info, local_elements_segments in process_local(file_or_folder, model, config, progress_info):
File "C:\Users\Ingecys\AppData\Local\Programs\Python\Python310\lib\site-packages\tafrigh\cli.py", line 151, in process_local
wav_file_path = str(wit_file_utils.convert_to_wav(file['file_path']).absolute())
NameError: name 'wit_file_utils' is not defined. Did you mean: 'file_utils'?