Auto-update: Fri Jan 31 15:08:42 PST 2025
This commit is contained in:
parent
532324ceb0
commit
ef6598e98d
2 changed files with 11 additions and 7 deletions
15
asr → mlx
15
asr → mlx
|
@ -31,12 +31,17 @@ def main():
|
|||
args = parser.parse_args()
|
||||
|
||||
audio_path = convert_to_mp3(args.file)
|
||||
task_mode = "translate" if args.translate else "transcribe"
|
||||
|
||||
whisper = LightningWhisperMLX(model="distil-medium", batch_size=12, quant=None)
|
||||
|
||||
result = whisper.transcribe(audio_path=audio_path, task=task_mode)['text']
|
||||
print(result)
|
||||
# Selecting a valid model
|
||||
whisper = LightningWhisperMLX(model="large-v3", batch_size=12, quant=None)
|
||||
|
||||
if args.translate:
|
||||
print("Translation mode enabled.")
|
||||
result = whisper.transcribe(audio_path=audio_path, language="en") # Explicitly setting language to English
|
||||
else:
|
||||
result = whisper.transcribe(audio_path=audio_path)
|
||||
|
||||
print(result['text'])
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
3
vpn
3
vpn
|
@ -23,7 +23,6 @@ PRIVACY_FRIENDLY_COUNTRIES = [
|
|||
TAILSCALE_ARGS = [
|
||||
'--exit-node-allow-lan-access',
|
||||
'--accept-dns',
|
||||
'--auto-update'
|
||||
]
|
||||
|
||||
def get_mullvad_info():
|
||||
|
@ -454,4 +453,4 @@ if __name__ == "__main__":
|
|||
set_random_exit_node_in_country(args.country)
|
||||
|
||||
elif args.action == 'status':
|
||||
get_status()
|
||||
get_status()
|
||||
|
|
Loading…
Add table
Reference in a new issue