GithubHelp home page GithubHelp logo

add support window about just_waveform HOT 9 OPEN

ryanheise avatar ryanheise commented on July 18, 2024
add support window

from just_waveform.

Comments (9)

ryanheise avatar ryanheise commented on July 18, 2024

As I don't personally have Windows, that would have to be a contribution if anyone is willing (although first I'd have to move to the federated plugin model).

But for your use case, I'd still recommend running audiowaveform server-side. It's simple enough to do (or you could just outsource the work.)

from just_waveform.

yelkamel avatar yelkamel commented on July 18, 2024

Okay thank you

if anyone is interessed to do that, contact me.

from just_waveform.

zjjt avatar zjjt commented on July 18, 2024

@yelkamel , Salut , i have a need to run this plugin on windows , have you found a way?
@ryanheise Hello, and thanks for the plugin it works wonderfully well on ios macos and android, could you please point to the alternative way as to have the progress stream server side and reuse your package's code as wrapper ? I use it to detect silences and make my avatar speak... unfortunately for me my target device for production is Windows

final progressStream = JustWaveform.extract(
        audioInFile: audioFile,
        waveOutFile: waveFile,
      );
      progressStream.listen((waveformProgress) {
        if (waveformProgress.waveform != null) {
          final waveform = waveformProgress.waveform;
          leoCurrentState = LeoState.talk;
          var player = soundPlayer.play(assetFilePath: soundPath);
          oldPlayer = player;
          // if (loop) {
          //   player.setReleaseMode(ReleaseMode.loop);
          // }
          player.onPlayerComplete.listen((event) async {
            leoCurrentState = LeoState.stopTalking;
            if (loop) {
              await Future.delayed(const Duration(milliseconds: 2000));
              _soundRepeat(soundPlayer, soundPath, loop, waveform);
            }
          });
          player.onPositionChanged.listen((Duration p) {
            final currentMaxPixelAtPosition =
                waveform?.getPixelMax(waveform.positionToPixel(p).toInt());
            leoCurrentState = _isSilence(currentMaxPixelAtPosition!, -100)
                ? LeoState.stopTalking
                : LeoState.talk;
          });
        }
      });

from just_waveform.

ryanheise avatar ryanheise commented on July 18, 2024

Unfortunately I don't have any sample code, and everybody will likely be using a different language in the server side, not necessarily Dart. But it should be simple for anyone who knows how to build a restful service, so if you don't know how to do that, you should first learn how to do that in whatever language you're using on the server side.

from just_waveform.

zjjt avatar zjjt commented on July 18, 2024

@ryanheise I know how to build one in fact my app has its backend written in rust and I thought about creating an endpoint to get the waveform data of an audio that I send to it ...what I am lacking is how to call the program audiowaveform ...I also thought of using the java code you made for the plug in on android to implement the c++ code for Windows using chatGPT since its been so long and my due date is next week and I have no time left to learn c++ ...I am that desperate

from just_waveform.

ryanheise avatar ryanheise commented on July 18, 2024

what I am lacking is how to call the program audiowaveform

Do you mean how to call exec to execute a program on the OS? I would expect that to be simple also, so I'm not sure whether that's what you mean is your obstacle. If you mean which command line options to pass to the program, the README of that program describes the options and this library is closely modelled on that.

If you are interested in porting to Windows, you might also want to look at the iOS implementation which is written in C (well, Objective C, but it's still mostly C).

from just_waveform.

zjjt avatar zjjt commented on July 18, 2024

@ryanheise yeah indeed it was exec on the Os ill create that endpoint today. I'll use it as last resort and I'll also try porting It to windows directly thanks for the time I'll look into the ios c code .in the 1st case the waveform class can be used to parse the output of the program ?

from just_waveform.

ryanheise avatar ryanheise commented on July 18, 2024

Yes, I have intentionally used that format in order to make it compatible with audiowaveform. Note that audiowaveform has an option to output in JSON as well which just_waveform doesn't support, so just make sure you get it to output in the binary format.

from just_waveform.

zjjt avatar zjjt commented on July 18, 2024

@ryanheise All right understood. I am almost done writing the endpoint. thanks a lot for your time and inputs

from just_waveform.

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.