transcription and speaker identification OpenAI-Whisper and Pyannote [Python]

Поділитися
Вставка
  • Опубліковано 13 тра 2023
  • Hello guys, in this video I will how you how to transcribe and identify the speaker by using OpenAI Whisper, Pyannote and Pydub .
    For Pyannote you must register on huggingface website to get the access token.
    Support me by subscribing to my channel and leave a like.
    Github repository for the source code :
    github.com/Mastering-Python-G...
    OpenAi github link :
    github.com/openai/whisper
    Pyannote github link :
    github.com/pyannote/pyannote-...
    Pydub github link :
    github.com/jiaaro/pydub
    #openai
    #openai_whisper
    #pyannote
    #pydub
    #python
    #speaker_identification
    #transcription
    #diarization

КОМЕНТАРІ • 36

  • @Yacine_zaki_abderrazzak
    @Yacine_zaki_abderrazzak Рік тому +1

    Thanks man, you deserve the best

  • @positivevibe142
    @positivevibe142 7 місяців тому

    ما شاء الله تبارك أخ محمد .... شكراً لك

  • @bootneck2222
    @bootneck2222 8 місяців тому

    Great video. Thank you. Can the output be displayed on screen whilst it is processing?

  • @ryanschwartz3340
    @ryanschwartz3340 11 місяців тому +1

    nice video. Is the repo hard-coded to your directory structure? when I tried to change it, it said the format wasn't recognized

  • @chungrandy780
    @chungrandy780 3 місяці тому +1

    Is there a colab version?

  • @hrishikeshnamboothiri.v.n2195
    @hrishikeshnamboothiri.v.n2195 8 місяців тому +3

    try to include its requirements.txt also...
    Thanks

  • @lawrencemedina5593
    @lawrencemedina5593 8 місяців тому +1

    conda activate open_chatting does not work on my computer. "EnvironmentNameNotFound: Could not find conda environment: open_chatting
    You can list all discoverable environments with `conda info --envs`."

    • @masteringpython
      @masteringpython  8 місяців тому

      install conda toolkit then create an environment called open_chatting by typing :
      conda create --name open_chatting
      after that install the libraries that i mentioned in the video then run the code

  • @ThePikkutyyppi
    @ThePikkutyyppi 10 місяців тому +1

    can i use this program to split speakers to their own files? or is this only for transcription

    • @masteringpython
      @masteringpython  10 місяців тому

      read more about pyannote to see how to split speakers

    • @ThePikkutyyppi
      @ThePikkutyyppi 10 місяців тому

      @@masteringpython What? Where?

  • @leoncezammit2502
    @leoncezammit2502 7 місяців тому

    Im really struggling to get this working, would i be able you to send you my output log ?

  • @user-iu8le1pl3x
    @user-iu8le1pl3x 6 місяців тому

    Hi, Thanks for the Video. Need approach on how we can implement the solution with the large Audio with duration of 3 hours.

    • @KamilKaczmarekSolutions
      @KamilKaczmarekSolutions 6 місяців тому

      chunks

    • @KamilKaczmarekSolutions
      @KamilKaczmarekSolutions 6 місяців тому

      chunks and saving .txt from these chunks in files, add logic to see what chunks it already has (if you face error or sth, and you want to come back and don't have to start over, just continue where it left off)

  • @WhiteShark010
    @WhiteShark010 28 днів тому

    You have chance.

  • @Hirotodoroki
    @Hirotodoroki Рік тому +2

    trying to run this but getting File contains data in an unknown format. tried several files and tried a wav file too, but no luck

    • @masteringpython
      @masteringpython  Рік тому

      I advise you to use python anaconda to create development environment .Then install whisper openai ,after installing this library run a simple test to check if everything works correctly .Then install pyannote library and also run a simple test ( read carefully the installation guides maybe you missed something while installing the library)

    • @nadeembaig5943
      @nadeembaig5943 Місяць тому

      @Hirotodoroki were you able to resolve the error (File Contains data in Unknown Format)?

  • @user-ej4ol8zv9y
    @user-ej4ol8zv9y 11 місяців тому +1

    does this model work on languages other than English?

    • @masteringpython
      @masteringpython  11 місяців тому

      onely english

    • @PaweDuzy
      @PaweDuzy 4 місяці тому

      @@masteringpython Only english? What is I change model = whisper.load_model("small.en") to "small"? Acording to Whisper github documentation.

  • @user-zz3iv1qz6v
    @user-zz3iv1qz6v Рік тому +1

    Thanks for the demo. I am getting the following error, even while using your audio.mp3 file:
    end = int(millisec(j[3]))
    return (int)((int(spl[0]) * 60 * 60 + int(spl[1]) * 60 + float(spl[2])) * 1000)
    ValueError: invalid literal for int() with base 10: ''

    • @user-zz3iv1qz6v
      @user-zz3iv1qz6v Рік тому

      @mamido mami Yes, I did that, still getting the same error

    • @auflute
      @auflute Рік тому

      same problem

    • @user-uy7fc3sf8x
      @user-uy7fc3sf8x Рік тому

      same problem

    • @jbatista2008
      @jbatista2008 10 місяців тому

      From the error message and the code, it seems that the error is happening because the millisec function is trying to convert an empty string to an integer.
      The millisec function splits a time string, given in the format "hh:mm:ss.sss", into hours, minutes, and seconds, and then converts these components to milliseconds.
      Here is an example of the string being parsed:
      ['[', '00:00:00.998', '-->', '', '00:00:20.622]', 'G', 'SPEAKER_01']
      When this loop runs, it returns an empty 'end' string:
      for l in range(len(k)):
      j = k[l].split(" ")
      start = int(millisec(j[1]))
      end = int(millisec(j[3]))
      The array position you want for 'end' is 4, not 3. Plus, it has a ']' symbol, so it must be cleaned up:
      for l in range(len(k)):
      j = k[l].split(" ")
      start = int(millisec(j[1].rstrip(']'))) # remove trailing ']'
      end = int(millisec(j[4].rstrip(']'))) # remove trailing ']'

  • @enriqueleonmacias249
    @enriqueleonmacias249 9 місяців тому

    Wow, the transcript takes like two times the duration of the file to process. I guess that this solution wouldn’t work to monitor hours of call recordings unless you use gpu servers.

    • @masteringpython
      @masteringpython  9 місяців тому

      it is recomended to use cuda ( nvidia gpu ) for speed
      cpu is very slow

  • @patoyrigoyen
    @patoyrigoyen 11 місяців тому +1

    Does this need GPU?

    • @masteringpython
      @masteringpython  11 місяців тому +2

      in this video i did not used GPU, but if you want to use it read the pyannote documentation

  • @ghulamshabbir9532
    @ghulamshabbir9532 9 місяців тому +1

    do this work offline ?

  • @kmillanr
    @kmillanr 16 днів тому

    no code in video