Skip to content

Conversation

@soimort
Copy link
Owner

@soimort soimort commented Oct 28, 2017

The option -dump dumps the raw API response (almost always JSON) to the stdout for future consumption (by a 3rd party program):

$ trans -dump :fi 'hello world'
[[["Hei maailma","hello world",null,null,1]],null,"en",null,null,[["hello world",null,[["Hei maailma",1000,true,false],["hello maailma",0,true,false],["Hello World",0,true,false]],[[0,11]],"hello world",0,0]],1,null,[["en"],null,[1],["en"]],null,null,null,null,null,[["World"]]]

The option -download-audio downloads the Text-to-Speech audio into the current folder (#77). It by default uses the translated text; when used in combination with -speak or -no-trans it yields the audio of the original text. (Known issue: -no-trans doesn't work with Bing engine.)

$ trans -download-audio :fi 'hello world'

Alternatively, -download-audio-as may be used to specify a filename:

$ trans -download-audio-as=output.ts :fi 'hello world'

@soimort soimort merged commit 2870ca6 into develop Oct 28, 2017
@soimort soimort deleted the dump-and-download branch October 28, 2017 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants