Skip to content

Language selection #24

Discussion options

You must be logged in to vote

Hi @aleksandermajos,
You are welcome, 'Glad you found pywhispercpp useful :)

If I understand your question correctly, you are asking about how to change the language during initialization ?
You can change it as follows:

from pywhispercpp.model import Model

model = Model('large', language="de") # I think "de" for german in your case 
segments = model.transcribe('file.mp3')
for segment in segments:
    print(segment.text)

This will output the segments in the target language, and you need of course to use the large model.
Let me know if that answers your question ?

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@aleksandermajos
Comment options

@abdeladim-s
Comment options

@Mabenan
Comment options

@abdeladim-s
Comment options

Answer selected by aleksandermajos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants