Created
December 24, 2024 04:19
-
-
Save devxpy/0309ef27a2ca852966e9f45ae1e9ec69 to your computer and use it in GitHub Desktop.
Gooey.AI Lipsync Flutter Wav2Lip
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:http/http.dart' as http; | |
import 'dart:convert'; | |
main() async { | |
var request = http.MultipartRequest( | |
'POST', | |
Uri.parse('https://api.gooey.ai/v3/Lipsync/async/form/'), | |
); | |
request.headers['Authorization'] = 'bearer sk-hhm...POJ'; | |
request.files.add(http.MultipartFile.fromBytes('input_face', [])); | |
request.files.add(http.MultipartFile.fromBytes('input_audio', [])); | |
request.fields['json'] = jsonEncode({ | |
"face_padding_top": '0', | |
"face_padding_bottom": '0', | |
"face_padding_left": '0', | |
"face_padding_right": '0', | |
"selected_model": "Wav2Lip", | |
}); | |
var response = await request.send(); | |
print(response.statusCode); | |
print(await response.stream.bytesToString()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment