Coder Social home page Coder Social logo

Real-time transcription about swiftwhisper HOT 13 OPEN

exphat avatar exphat commented on May 24, 2024 3
Real-time transcription

from swiftwhisper.

Comments (13)

cerupcat avatar cerupcat commented on May 24, 2024 1

I'd also like to see an SFSpeechRecognizer-like API for easy replacement of SFSpeechRecognizer.

from swiftwhisper.

libratiger avatar libratiger commented on May 24, 2024

+1 for this feature

from swiftwhisper.

fakerybakery avatar fakerybakery commented on May 24, 2024

Yes, this would be a great feature.

from swiftwhisper.

fakerybakery avatar fakerybakery commented on May 24, 2024

Right now, I'm setting a timer to start + stop the transcription every 2 seconds, however it's not that accurate because if a word is cut off, then whisper tries to improvise, and the text often has hallucinations.

from swiftwhisper.

jacobjiangwei avatar jacobjiangwei commented on May 24, 2024

how would whiper officially support real time? The cut off issue is same for official library, correct? @fakerybakery

from swiftwhisper.

cerupcat avatar cerupcat commented on May 24, 2024

how would whiper officially support real time? The cut off issue is same for official library, correct? @fakerybakery

The Whisper cpp repo has examples of how to implement realtime.

from swiftwhisper.

fakerybakery avatar fakerybakery commented on May 24, 2024

I think that the whisper.cpp library stores some of the previous recording history and uses that to fix the cutoff issue, but I'm not sure.

from swiftwhisper.

jacobjiangwei avatar jacobjiangwei commented on May 24, 2024

how would whiper officially support real time? The cut off issue is same for official library, correct? @fakerybakery

The Whisper cpp repo has examples of how to implement realtime.

thanks for point that out. Just curious, why it's in Obj-C but not in swift version...

from swiftwhisper.

fakerybakery avatar fakerybakery commented on May 24, 2024

I don't know why, but if someone could port the example to Swift, I would really appreciate that (I'm really bad at Obj-C).

from swiftwhisper.

brytonsf avatar brytonsf commented on May 24, 2024

I think that the whisper.cpp library stores some of the previous recording history and uses that to fix the cutoff issue, but I'm not sure.

Yep, I believe it does too – see this line (and line 245)

from swiftwhisper.

barkb avatar barkb commented on May 24, 2024

Don't have a great understanding, but to me it looks like whisper.objc is storing the contents of a buffer when it fills up, then calling it's transcribe function against what it just stored, while clearing the buffer and re-enqueuing it. I don't know a ton about AVFAudio, but does anyone know if you could use AVAudioEngine and AVAudioPCMBuffer to create similar functionality? I'm thinking you could call Whisper.transcribe here with the buffer data if you can get that buffer data back from AVAudioEngine. Does anyone know if that would work?

from swiftwhisper.

ldenoue avatar ldenoue commented on May 24, 2024

@barkb have you ever found a solution to this real-time idea?

from swiftwhisper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.