Recherche avancée

Médias (0)

Mot : - Tags -/metadatas

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (59)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

Sur d’autres sites (7407)

  • OSError : [WinError 126] Não foi possível encontrar o módulo especificado. Error loading [closed]

    27 août 2024, par Felipes

    Informações relevantes

    


    **
SO : Windowns 11
Dependencias : torch —extra-index-url https://download.pytorch.org/whl/cpu ;
openai-whisper ;
ffmpeg-python
Microsoft Visual C++ Redistributable

    


    Tudo isso dentro de um ambiente virtual
**

    


    Então... eu to com o seguinte codigo em python :

    


    import whisper
import os

# Carregar o modelo
model = whisper.load_model("base")  # Pode usar 'small', 'medium', 'large' conforme a necessidade

# Carregar o áudio
audio_path = "audio.mp3"  # Substitua pelo caminho do arquivo de áudio extraído
result = model.transcribe(audio_path)

# Obter o texto da transcrição
transcription_text = result['text']

# Salvar a transcrição em um arquivo .txt
with open("transcription.txt", "w") as file:
    file.write(transcription_text)

print("Transcrição salva em 'transcription.txt'")


    


    Basicamente é pegar um arquivo .mp3 e salvar a transcrisão no em arquivo txt
mas ao rodar o codigo eu recebo o seguinte erro :

    


    Traceback (most recent call last):&#xA;  File "C:\Users\Felipe Bezerra\Documents\ytDownload\transcrisao.py", line 2, in <module>&#xA;    import whisper&#xA;  File "C:\Users\Felipe Bezerra\Documents\ytDownload\venv\Lib\site-packages\whisper\__init__.py", line 8, in <module>&#xA;    import torch&#xA;  File "C:\Users\Felipe Bezerra\Documents\ytDownload\venv\Lib\site-packages\torch\__init__.py", line 148, in <module>&#xA;    raise err&#xA;OSError: [WinError 126] N&#xE3;o foi poss&#xED;vel encontrar o m&#xF3;dulo especificado. Error loading "C:\Users\Felipe Bezerra\Documents\ytDownload\venv\Lib\site-packages\torch\lib\fbgemm.dll" or one of its dependencies.&#xA;</module></module></module>

    &#xA;

    É como se as dependências não estivecem instaladas, já verifiquei a variavél de ambiente, criei outro ambiente virtual, e sempre caio nesse mesmo erro.

    &#xA;

    PS : o msm codigo rodou perfeitamente no Debian 12

    &#xA;

    Verifiquei o ambiente virtual, reistalei tudo

    &#xA;

  • Package is installed inside docker but actual command provide exception

    1er juin 2022, par user1765862

    I'm trying to use ffmpeg core package inside .net 6 dockerized project. I install ffmpeg core inside Dockerfile, reference actual package FFMpegCore inside solution but when I try to apply any of the commands from the ffmpeg core lib I'm getting error

    &#xA;

    &#xA;

    An error occurred trying to start process './ffmpeg' with working&#xA;directory '/var/task'. No such file or directory

    &#xA;

    &#xA;

    Docker build is done with no error.

    &#xA;

    Dockerfile

    &#xA;

    FROM public.ecr.aws/lambda/dotnet:6 AS base&#xA;....&#xA;RUN apt-get install -y ffmpeg&#xA;....&#xA;FROM base AS final&#xA;WORKDIR /var/task&#xA;COPY --from=publish /app/publish .&#xA;

    &#xA;

    As per ffmpeg core docs in order to use ffmpeg I need to set its binary folder, so I add ffmpeg.config.json

    &#xA;

    {&#xA;  "BinaryFolder": "/var/task",&#xA;  "TemporaryFilesFolder": "/tmp"&#xA;}&#xA;

    &#xA;

    Actual error is being thrown when I try to execute following command

    &#xA;

    &#xA;

    An error occurred trying to start process './ffmpeg' with working&#xA;directory '/var/task'. No such file or directory

    &#xA;

    &#xA;

    This is the place where error gets triggered

    &#xA;

     using FFMpegCore;&#xA; ...&#xA; public class MyController : ControllerBase&#xA;    {&#xA;        public async Task<string> Get()&#xA;        {    &#xA;             await FFMpegArguments&#xA;                   .FromPipeInput(new StreamPipeSource(myfile))&#xA;                   .OutputToPipe(new StreamPipeSink(outputStream), options => options&#xA;                      .WithVideoCodec("vp9")&#xA;                      .ForceFormat("webm"))&#xA;                      .ProcessAsynchronously();&#xA;             ...&#xA;        }    &#xA;    }&#xA;</string>

    &#xA;

    Update :&#xA;After changing BinaryFolder location to /usr/bin I'm getting following error

    &#xA;

    An error occurred trying to start process &#x27;/usr/bin/ffmpeg&#x27; with working directory &#x27;/var/task&#x27;. No such file or directory&#xA;

    &#xA;

    Update #2&#xA;This is my complete Dockerfile

    &#xA;

    FROM public.ecr.aws/lambda/dotnet:6 AS base&#xA;&#xA;FROM mcr.microsoft.com/dotnet/sdk:6.0-bullseye-slim as build&#xA;WORKDIR /src&#xA;COPY ["AWSServerless.csproj", "AWSServerless/"]&#xA;RUN dotnet restore "AWSServerless/AWSServerless.csproj"&#xA;&#xA;WORKDIR "/src/AWSServerless"&#xA;COPY . .&#xA;RUN dotnet build "AWSServerless.csproj" --configuration Release --output /app/build&#xA;&#xA;FROM build AS publish   &#xA;&#xA;RUN apt-get update \&#xA;    &amp;&amp; apt-get install -y apt-utils libgdiplus libc6-dev \&#xA;    &amp;&amp; apt-get install -y ffmpeg&#xA;&#xA;RUN dotnet publish "AWSServerless.csproj" \&#xA;            --configuration Release \ &#xA;            --runtime linux-x64 \&#xA;            --self-contained false \ &#xA;            --output /app/publish \&#xA;            -p:PublishReadyToRun=true  &#xA;&#xA;FROM base AS final&#xA;WORKDIR /var/task&#xA;&#xA;CMD ["AWSServerless::AWSServerless.LambdaEntryPoint::FunctionHandlerAsync"]&#xA;COPY --from=publish /app/publish .&#xA;

    &#xA;

  • Patent skullduggery : Tandberg rips off x264 algorithm

    25 novembre 2010, par Dark Shikari — patents, ripoffs, x264

    Update : Tandberg claims they came up with the algorithm independently : to be fair, I can actually believe this to some extent, as I think the algorithm is way too obvious to be patented. Of course, they also claim that the algorithm isn’t actually identical, since they don’t want to lose their patent application.

    I still don’t trust them, but it’s possible it’s merely bad research (and thus being unaware of prior art) as opposed to anything malicious. Furthermore, word from within their office suggests they’re quite possibly being honest : supposedly the development team does not read x264 code at all. So this might just all be very bad luck.

    Regardless, the patent is still complete tripe, and should never have been filed.

    Most importantly, stop harassing the guy whose name is on the patent (Lars) : he’s just a programmer, not the management or lawyers responsible for filing the patent. This is stupid and unnecessary. I’ve removed the original post because of this ; it can be found here for those who want to read it.

    Appendix : the details of the patent :

    I figure I’ll go over the exact correspondence between the patent and my code here.

    1. A method for calculating run and level representations of quantized transform coefficients representing pixel values included in a block of a video picture, the method comprising :

    Translation : It’s a run-level coder.

    packing, at a video processing apparatus, each quantized transform coefficients in a value interval [Max, Min] by setting all quantized transform coefficients greater than Max equal to Max, and all quantized transform coefficients less than Min equal to Min

    The quantized coefficients are clipped to a certain valid range to allow them to be packed into bytes (they start as 16-bit values).

    reordering, at the video processing apparatus, the quantized transform ID coefficients according to a predefined order depending on respective positions in the block resulting in an array C of reordered quantized transform coefficients

    This is the zigzag pattern used in H.264 (and most formats) for reordering DCT coefficients. In x264, this is done before the run-level coder ste.

    masking, at the video processing apparatus, C by generating an array M containing ones in positions corresponding to positions of C having non-zero values, and zeros in positions corresponding to positions of C having zero values

    This is creating a bitmask based on the coefficient values, the pmovmskb step.

    is generating, at the video processing apparatus, for each position containing a one in M, a run and a level representation by setting the level value equal to an occurring value in a corresponding position of C ; and setting, at the video processing apparatus, for each position containing a one in M5 the run value equal to the number of proceeding positions relative to a current position in M since a previous occurrence of one in M.

    This is the process of creating run/level values from the bitmask.

    Now into the detailed claims :

    2. The method according to Claim 1, wherein the masking further includes, creating an array C from C where positions corresponding to positions of nonzero values in C are filled with ones, and positions corresponding to positions of zero values in C are filled with zeros, and creating M from C by extracting the most significant bit from values in respective position of C and inserting the bits in corresponding positions in M.

    They’re extracting the most significant bit of the values to create a bitmask. This is exactly what the pmovmskb in my algorithm does.

    3. The method according to Claim 2, wherein the creating of the array C is executed by a C++ function PCMPGTB, and the creating of M from C is executed by a C++ function PMOVMSKB.

    And here they use pcmpgtb (they call it a C++ function for some reason, but it’s a SSE instruction) to do the clipping of the input values. This is exactly the same method I used in decimate_score. They also use pmovmskb as mentioned.

    4. The method according to Claim 1 , wherein the generating of the run and level representation further includes determining positions containing non-zero values in C by corresponding positions containing ones in M.

    5. The method according to Claim 4, wherein the determining of positions containing non-zero values in C is executed by a C++ function BSF.

    Here they iterate over the bitmask of transform coefficients using a “BSF” function to find runs, which is exactly what I did. Of course, BSF isn’t a function, it’s an x86 instruction.

    6. The method according to Claim 1 , wherein Max is 256 and Min is 0.

    This is almost surely a typo or mistake of some sort. They mean the Max should be 255, not 256 : 256 doesn’t fit in a uint8_t.

    7. The method according to Claim 1 , wherein the predefined order follows a zigzag path of transform coefficient positions in the block starting in an upper left corner heading towards a lower right corner.

    This is a description of the typical DCT zigzag pattern (like in H.264, MPEG-2, Theora, etc).

    Everything after this part is just repeating itself with the phrase “an apparatus” added in order to make the USPTO listen to them.