Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: [Solved] I'm not getting the good type
Post: RE: [almost solved] I'm not getting the good type
(Apr-11-2024, 01:06 PM)Gribouillis Wrote: Don't manipulate the garbage collector, it is completely useless for what you are doing.OK, I didn't see any difference with or without garbage collector, s... |
|
slain |
General Coding Help |
18 |
1,049 |
Apr-11-2024, 01:36 PM |
|
|
Thread: [Solved] I'm not getting the good type
Post: RE: [almost solved] I'm not getting the good type
(Apr-11-2024, 10:49 AM)Gribouillis Wrote: Is audio1.mp3 the name of your temporary file? Or was it written by some other portion of the code?
For me, it's written in the function convtomp3()
def con... |
|
slain |
General Coding Help |
18 |
1,049 |
Apr-11-2024, 12:35 PM |
|
|
Thread: [Solved] I'm not getting the good type
Post: RE: [almost solved] I'm not getting the good type
(Apr-11-2024, 09:02 AM)Gribouillis Wrote: If you want to stay with pathlib, you could also write
Path(temp_file.name).unlink(missing_ok=True)I tried to add it at line 61, ls still shows me an audio1... |
|
slain |
General Coding Help |
18 |
1,049 |
Apr-11-2024, 09:54 AM |
|
|
Thread: [Solved] I'm not getting the good type
Post: RE: [almost solved] I'm not getting the good type
Oh, I have another question again **huh**
So, I know my code is still not perfect, but I would like to understand one more point - and solve it if possible.
At this point, my code allowed me to con... |
|
slain |
General Coding Help |
18 |
1,049 |
Apr-11-2024, 09:49 AM |
|
|
Thread: [Solved] I'm not getting the good type
Post: RE: [almost solved] I'm not getting the good type
(Apr-11-2024, 08:55 AM)Gribouillis Wrote: Reading the documentation about NamedTemporaryFile, the temporary file should be automatically deleted when it is closed because the default values of param... |
|
slain |
General Coding Help |
18 |
1,049 |
Apr-11-2024, 09:11 AM |
|
|
Thread: [Solved] I'm not getting the good type
Post: RE: I'm not getting the good type
(Apr-10-2024, 03:01 PM)Gribouillis Wrote: I disapprove the solution that you found in stackoverflow because instead of solving the problem it hides the problem. You still don't know why the file nam... |
|
slain |
General Coding Help |
18 |
1,049 |
Apr-11-2024, 07:17 AM |
|
|
Thread: [Solved] I'm not getting the good type
Post: RE: [almost solved] I'm not getting the good type
(Apr-10-2024, 02:59 PM)SandraYokum Wrote: Have you tried replacing waveform = file.getvalue() with waveform = temp_file.read()? This reads data from the temp_file file, which has a similar effect to... |
|
slain |
General Coding Help |
18 |
1,049 |
Apr-11-2024, 06:58 AM |
|
|
Thread: [Solved] I'm not getting the good type
Post: RE: I'm not getting the good type
**dance**
I googled on my side and I could resolve a part of my problem.
I found a similar cas on Stack overflow;
With this example, I modified my line 45 : waveform = file.read() (and not getval... |
|
slain |
General Coding Help |
18 |
1,049 |
Apr-10-2024, 02:48 PM |
|
|
Thread: [Solved] I'm not getting the good type
Post: RE: I'm not getting the good type
I added the . at the beginning of each suffix, il will be cleaner like that.
It still throws me this error:
AttributeError: '_io.BufferedRandom' object has no attribute 'getvalue'
Traceback:
File "/h... |
|
slain |
General Coding Help |
18 |
1,049 |
Apr-10-2024, 01:49 PM |
|
|
Thread: [Solved] I'm not getting the good type
Post: RE: I'm not getting the good type
(Apr-10-2024, 08:48 AM)Gribouillis Wrote: If the filename's suffix is not one of m4a, wav, wma, the function convtomp3() will return None, this is probably what happens in your case.
Hello and thank... |
|
slain |
General Coding Help |
18 |
1,049 |
Apr-10-2024, 11:49 AM |
|
|
Thread: [Solved] I'm not getting the good type
Post: [Solved] I'm not getting the good type
Hello,
What I want to do :
The user uploads an audio record (taken from windows 10/11's audio recorder, or recorded during a Teams meeting, or recorded with a smartphone or whatever) => the script... |
|
slain |
General Coding Help |
18 |
1,049 |
Apr-10-2024, 07:51 AM |
|
|
Thread: [Abandoned] Get the good type to pass to a transcriber model
Post: RE: Get the good type to pass to a transcriber mod...
We can close the topic: I won't be able to go further due to hardware constraints.
Here is my code, CUDA is getting out of memory before being able to transcript it:
## Imports ##
import torch
import... |
|
slain |
Data Science |
11 |
797 |
Apr-05-2024, 07:30 AM |
|
|
Thread: [Abandoned] Get the good type to pass to a transcriber model
Post: RE: Get the good type to pass to a transcriber mod...
I tested with this:
predicted_text = asr_model.transcribe([Path(audio_source.name)])It's not that:
TypeError: Object of type PosixPath is not JSON serializable
Traceback:
File "/home/ild/.local/lib/py... |
|
slain |
Data Science |
11 |
797 |
Apr-05-2024, 07:22 AM |
|
|
Thread: [Abandoned] Get the good type to pass to a transcriber model
Post: RE: Get the good type to pass to a transcriber mod...
Hello,
I just tested, it gives me another error :
FileNotFoundError: [Errno 2] No such file or directory: 'Test-transcription.mp3'
Traceback:
File "/home/ild/.local/lib/python3.12/site-packages/stream... |
|
slain |
Data Science |
11 |
797 |
Apr-05-2024, 07:19 AM |
|
|
Thread: [Abandoned] Get the good type to pass to a transcriber model
Post: RE: Get the good type to pass to a transcriber mod...
I'll test tomorrow, will keep you informed :) |
|
slain |
Data Science |
11 |
797 |
Apr-04-2024, 03:36 PM |
|
|
Thread: [Abandoned] Get the good type to pass to a transcriber model
Post: RE: Get the good type to pass to a transcriber mod...
So, I should try predicted_text = asr_model.transcribe(Path(audio_source.name)) ?
I'm not sure because audio_source is a streamlit file uploader, not directly the audio data...
Quote:It might make m... |
|
slain |
Data Science |
11 |
797 |
Apr-04-2024, 06:52 AM |
|
|
Thread: [Abandoned] Get the good type to pass to a transcriber model
Post: RE: Get the good type to pass to a transcriber mod...
So, as I understand, I should modify my line 35 as follows:
predicted_text = asr_model.transcribe(temp_file.name)I tried it and added a check to get the filename I'm passing to the transcribe ... |
|
slain |
Data Science |
11 |
797 |
Apr-03-2024, 03:02 PM |
|
|
Thread: [Abandoned] Get the good type to pass to a transcriber model
Post: RE: Get the good type to pass to a transcriber mod...
I tried some changes in my code, the traceback changed :
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmppvkyb7kx'
Traceback:
File "/home/ild/miniconda3/envs/transcript/lib/python3.10... |
|
slain |
Data Science |
11 |
797 |
Apr-03-2024, 01:13 PM |
|
|
Thread: [Abandoned] Get the good type to pass to a transcriber model
Post: [Abandoned] Get the good type to pass to a transcr...
Hello,
I'm quite new to Python, and trying to get a working transcriber with Streamlit and HuggingFace models.
I have an hardware constraint, my script must work on a 4GB Nvidia GPU...
Here is the c... |
|
slain |
Data Science |
11 |
797 |
Apr-03-2024, 12:42 PM |