GithubHelp home page GithubHelp logo

Comments (1)

bnsantoso avatar bnsantoso commented on June 15, 2024 1

if you want use fairseq vietnam model : sub = SubToAudio(language='vie') .

sub = SubToAudio(languages='vie') 
subtitle = sub.subtitle("01.vi.srt")
sub.convert_to_audio(data=subtitle, tempo_mode="all", tempo_speed=1.3, output_path="01.vi.wav", save_temp=True,)

there is no need to pass languages argument on self.convert_to_audio() func. fairseq model only have 1 speaker and 1 languages. and i notice that you give wrong argument lang="vie", instead languages="vie".

arg languages in SubToAudio() and self.convert_to_audio() have different purpose. SubToAudio(languages=<iso-code>) is for initialze and downloading model. self.convert_to_audio(languages="fr-fr") is for specify the languages within model that have multiple languages.

if you have your own model and config sub = SubToAudio(model_path="G_100000.pth" , config_path="config.json"), make sure it is correct model and corect config and correct path. isolate class instance to test or you can directly test your model from TTS api to check wether is perfeclty fine and can load.

maybe you have similiar issue like this, the model and config.json is not suported, wrong or does not match with model :
AttributeError: 'dict' object has no attribute 'replace'

if the model have multiple speaker and languages you can check them print(sub.apitts.languages) and print(sub.apitts.speakers).

from subtoaudio import SubToAudio
sub = SubToAudio(model_path="G_100000.pth" , config_path="config.json")
print(sub.apitts.languages) #print list of language on model
print(sub.apitts.speakers) #print list of speakers

from sub-to-audio.

Related Issues (17)

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.