-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdevelopers_vl.html
executable file
·931 lines (791 loc) · 38 KB
/
developers_vl.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-NXV9SPS');</script>
<!-- End Google Tag Manager -->
<!-- Global Site Tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-106536482-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments)};
gtag('js', new Date());
gtag('config', 'UA-106536482-1');
gtag('config', 'AW-798342114');
</script>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="img/favicon.ico">
<title>Voiceful - Developers</title>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Highlight.js styles -->
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css">
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<link href="css/ie10-viewport-bug-workaround.css" rel="stylesheet">
<!-- Custom fonts for this template -->
<link href="fonts/fonts.css" rel="stylesheet">
<!--<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700|Source+Sans+Pro:300,600" rel="stylesheet">-->
<!-- Custom styles for this template -->
<link href="css/common.css?v=0.1.3" rel="stylesheet">
<link href="css/developers.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body data-spy="scroll" data-target="#navbar">
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-NXV9SPS" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<div id="legal-modal" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title">Legal notice</h4>
</div>
<div class="modal-body">
<p>
For the purposes of complying with Spanish Law 34/2002 on information society services
and electronic commerce, the following information on Voctro Labs, S.L. is provided:
</p>
<table class="table">
<tbody>
<tr>
<th scope="row">Corporate Name</th>
<td>Voctro Labs, S.L.</td>
</tr>
<tr>
<th scope="row">Address</th>
<td>Carrer Pujades 74-80, 08005 Barcelona</td>
</tr>
<tr>
<th scope="row">E-mail address</th>
<td>[email protected]</td>
</tr>
<tr>
<th scope="row">Entry data in the Companies Registry of Barcelona</th>
<td>Volume 42942, Folio 161, Page number B 420239</td>
</tr>
<tr>
<th scope="row">Tax Code</th>
<td>B65699662</td>
</tr>
</tbody>
</table>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<div id="vosyn-modal" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title">VoSyn</h4>
</div>
<div class="modal-body">
<p> Recent advances in the area of Machine Learning and Artificial Intelligence can be applied to the generation of a human-like voice signals. Given a set of recordings of a speaker or singer of several minutes, we can create a voice model that captures its main treats, including singing expression. Once this voice model is loaded, Voiceful can generate new content. You can refer to the technical details in this research publication. </p>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /#vosyn-modal -->
<div id="votrans-modal" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title">VoTrans</h4>
</div>
<div class="modal-body">
<p> Manipulating voice recordings have several applications in the creative media industries. Voiceful offers a patented voice transformation technology [Patent Nr.] that can be integrated in real-time (e.g. a plugin for a Unity videogame, audio FX in a DAW) or as batch processing tool in a post-production workflow (e.g. for film, games, animation, TV, music). </p>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /#votrans-modal -->
<div id="voalign-modal" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title">VoAlign</h4>
</div>
<div class="modal-body">
<p> Editing a voice recording without altering the original voice quality has been extensively used in music and film productions with tools such as pitch correction and dialogue synchronization.
Voiceful provides a tool that analyzes and automatically corrects a voice recording. In film applications, Voiceful can synchronize two voice recordings in the ADR workflow (Automatic Dialogue Replacement). We can use onset and phonetic alignment to generate lip-synched animations. In music, VoAlign allows to automatically estimate the musical key of an a capella recording and applying pitch correction to achieve perfect tuning. </p>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /#voalign-modal -->
<div id="vodesc-modal" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title">VoDesc</h4>
</div>
<div class="modal-body">
<p>A voice recording conveys an incredible amount of information. For speech, it can be information about the words, about the person, about the emotion; while for singing voice it can bring also information about notes, intonation, the key and tempo of a song. To make clear, Voiceful is not a speech recognition solution. Besides the world of creative media, the analysis algorithms in Voiceful can be further extended for Medical or forensic applications. Check in this example the analysis output and the format of exported data.</p>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /#vodesc-modal -->
<div id="voscale-modal" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title">VoScale</h4>
</div>
<div class="modal-body">
<p>Be it a commercial music downmix, be it a field-recording for a film, Voiceful can change the duration and key while preserving the quality of the original recording. Playback speed and transposition controls can be passed dynamically in real-time. For example, the tempo of a song can be changed on the fly synched by a runner's pace, or a gesture movement on a mobile phone. This is a validated professional audio tool, and we are happy when clients with trained ears choose Voiceful over other solutions in the market. Check our demo <a href="#"> here [LINK VOSCALE VIDEO].
</a> </p>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /#voscale-modal -->
<div id="vomix-modal" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title">VoMix</h4>
</div>
<div class="modal-body">
<p>
This is a utility to automatically mix the contents generated by Voiceful with existing musical or FX background tracks. All parameters are configurable and can be adjusted through our VoMix Editor GUI tool <a target="_blank" href="img/vomix_UI.png"> [see screenshot]. </a> VoMix is usually place as tha last process in a multi-stage workflow. </p>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /#vomix-modal -->
<nav class="navbar navbar-fixed-top navbar-default" role="navigation">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="./index.html">
<img alt="voiceful" src="img/voicefulx2.png">
</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="index.html" class="btn btn-default navbar-btn">BACK TO MAIN</a></li>
<li><a>DEVELOPERS PAGE</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<div class="container-fluid">
<div id="first-row" class="row section text-center">
<div class="col-xs-12">
<h1>Developers</h1>
</div>
<div class="col-xs-12">
<p class="subtitle">
We aim to put Voiceful available to creative minds and companies around the globe that bring new digital voice experiences and services to the society.
Check out our tools, documentation and example code, and request a free evaluation account.
</p>
</div>
</div>
</div>
<div id="rubric" class="container-fluid">
<div id="rubric-inner">
<div id="what" class="row section grey-bg text-center">
<div class="col-xs-12">
<div class="row">
<div class="col-xs-12">
<h2>DOCUMENTATION</h2>
</div>
<div class="col-xs-12 col-sm-offset-3 col-sm-6">
<p>
Voiceful offers a set of voice and audio processing <a href="#tools">tools</a> through a RESTful API for a SaaS access, and a SDK with native libraries for integration in standalone mobile, desktop or server applications.
</p>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-offset-3 col-sm-6">
<img class="icon-img" src="img/icon3.png">
<h3>Cloud API</h3>
<p>
You can check the full documentation here: <a href="https://cloud.voctrolabs.com/docs/api"> https://cloud.voctrolabs.com/docs/api</a> .
</p>
<div id="cloud-code" class="code-tabs">
<!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#cloud-code-python" aria-controls="home" role="tab" data-toggle="tab">Python</a></li>
<li role="presentation"><a href="#cloud-code-php" aria-controls="profile" role="tab" data-toggle="tab">PHP</a></li>
<li role="presentation"><a href="#cloud-code-cpp" aria-controls="profile" role="tab" data-toggle="tab">C++</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="cloud-code-python">
<pre class="pre-scrollable">
<code class="lang-python">
import time
import requests # sudo pip install requests
#set user credentials
user = '[email protected]'
password = 'yourpassword'
# Python example that interacts with VOICEFUL VoScale API
# It creates a new task, starts it and waits until
# processing have been finished
url_vocloud = 'https://cloud.voctrolabs.com'
if __name__ == '__main__':
# CREATE TASK //////////////////////////////////////////
print '*** CREATE TASK ***'
#set parameters for transformation
timestretch = 0.8;
pitchshift = 3.0;
payload = {
"time_stretch_ratio": timestretch,
"pitch_shift": pitchshift,
"audio_upload_parts": 1
}
# Post request
response_create = requests.post(url_vocloud + "/api/voscale/tasks",
json=payload,
auth=(user, password))
print(response_create.json())
# Then upload (PUT) audio file to S3 url address returned in
#response_create.json()["audio_upload_urls"][0]
print "\n*** UPLOAD FILES ***"
filepath = "test.wav"
fh = open(filepath)
audio_data_binary = fh.read()
response_upload = requests.put(response_create.json()["audio_upload_urls"][0], data=audio_data_binary)
print("returned ok?:" + str(response_upload.ok) +
" reason:" + response_upload.reason +
" status_code:" + str(response_upload.status_code))
# START TASK ///////////////////////////////////////////
print "\n*** START TASK ***"
task_url = url_vocloud + "/api/voscale/tasks/" +
response_create.json()["id"].encode('utf-8')
response_start = requests.post(task_url + "/start",
auth=(user, password))
print("returned ok?:" + str(response_start.ok) +
" reason:" + response_start.reason +
" status_code:" + str(response_start.status_code))
# Check if task finished
print "\n*** TASK PROCESSED? ***"
print "Processing...";
while True:
time.sleep(1) # delays for 1 seconds
response_status = requests.get(task_url,
auth=(user, password))
if response_status.json()["status"] == 'finished' or
response_status.json()["status"] == 'failed':
break
else:
print '.'
print "** Output URL: " + response_status.json()['audio_url']
# Download file
response_download = requests.get(response_status.json()['audio_url'],
stream=True)
if response_download.status_code == 200:
with open("output.wav", 'wb') as f:
for chunk in response_download.iter_content(1024):
f.write(chunk)
</code>
</pre>
</div>
<div role="tabpanel" class="tab-pane" id="cloud-code-php">
<pre class="pre-scrollable">
<code class="lang-php">
// PHP example that interacts with VOICEFUL VoScale API
// It creates a new task, starts it and waits until
// processing have been finished
//set user credentials
$user = "[email protected]";
$password = "yourpassword";
$url_vocloud = "https://cloud.voctrolabs.com";
// CREATE TASK //////////////////////////////////////////
//set parameters for transformation
$timestretch = 0.8;
$pitchshift = 3.0;
$postDataCreate = array(
'time_stretch_ratio' => $timestretch,
'pitch_shift' => $pitchshift,
'audio_upload_parts' => 1
);
// Setup cURL
$chCreate = curl_init($url_vocloud.'/api/voscale/tasks');
curl_setopt_array($chCreate, array(
CURLOPT_POST => TRUE,
CURLOPT_RETURNTRANSFER => TRUE,
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json'
),
CURLOPT_POSTFIELDS => json_encode($postDataCreate)
));
curl_setopt($chCreate, CURLOPT_USERPWD, $user . ":" . $password);
// Send the request
$responseCreate = curl_exec($chCreate);
curl_close($chCreate);
echo "** Response from create task: ********\n".$responseCreate."\n";
// Check for errors
if($responseCreate === FALSE){
die(curl_error($chCreate));
}
$responseCreate_obj = json_decode($responseCreate,true);
// Then upload (PUT) audio file to S3 url address returned
// in $responseCreate_obj["audio_upload_urls"][0]
$audio_fn = "test.wav";
$audio = fopen($audio_fn, "rb");
$chUpload = curl_init();
curl_setopt($chUpload, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($chUpload, CURLOPT_HEADER, false);
curl_setopt($chUpload, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($chUpload, CURLOPT_BINARYTRANSFER, 1);
curl_setopt($chUpload, CURLOPT_URL, $responseCreate_obj["audio_upload_urls"][0]);
curl_setopt($chUpload, CURLOPT_PUT, 1);
curl_setopt($chUpload, CURLOPT_INFILE, $audio);
curl_setopt($chUpload, CURLOPT_INFILESIZE, filesize($audio_fn));
$responseUpload = curl_exec($chUpload);
curl_close($chUpload);
echo "\n** Response from upload audio to S3: *****\n".$responseUpload."\n";
// START TASK ///////////////////////////////////////////
$task_id = $responseCreate_obj["id"];
$task_url = $url_vocloud."/api/voscale/tasks/".$task_id;
// The data to send to the API
$postDataStart = array(
'task_url' => $task_url
);
// Setup cURL
$chStart = curl_init($task_url."/start");
curl_setopt_array($chStart, array(
CURLOPT_POST => TRUE,
CURLOPT_RETURNTRANSFER => TRUE,
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json'
),
CURLOPT_POSTFIELDS => json_encode($postDataStart)
));
curl_setopt($chStart, CURLOPT_USERPWD, $user . ":" . $password);
// Send the request
$responseStart = curl_exec($chStart);
curl_close($chStart);
echo "\n** Response from start task: ******\n".$responseStart."\n";
// Check for errors
if($responseStart === FALSE){
die(curl_error($chStart));
}
$responseStart_obj = json_decode($responseStart,true);
echo "\nProcessing...";
while ( ($responseStatus_obj['status'] != 'failed') and
($responseStatus_obj['status'] != 'finished') )
{
sleep(1);
// Setup cURL
$chStatus = curl_init($task_url);
curl_setopt($chStatus,CURLOPT_RETURNTRANSFER,true);
curl_setopt($chStatus, CURLOPT_USERPWD, $user . ":" . $password);
// Send the request
$responseStatus = curl_exec($chStatus);
curl_close($chStatus);
$responseStatus_obj = json_decode($responseStatus,true);
echo ".";
}
echo "\n\n** Response from status task: ******\n".$responseStatus."\n";
// Check for errors
if($responseStatus === FALSE){
die(curl_error($chStatus));
}
//Decode the response
$responseData_obj = json_decode($responseStatus, TRUE);
//Print output audio generated
echo "\n** Output URL: ".$responseData_obj["audio_url"]."\n";
</code>
</pre>
</div>
<div role="tabpanel" class="tab-pane" id="cloud-code-cpp">
<pre class="pre-scrollable">
<code class="lang-Cpp">
// C++ example that interacts with VOICEFUL VoScale API
// It creates a new task, starts it and waits until
// processing have been finished, downloading the result
#include <iostream>
#include "json.hpp" // https://github.com/nlohmann/json
#include <chrono>
#include <thread>
#include <stdlib.h>
#include <fstream>
// https://github.com/jpbarrette/curlpp
#include <curlpp/cURLpp.hpp>
#include <curlpp/Easy.hpp>
#include <curlpp/Options.hpp>
#include <curlpp/Exception.hpp>
#include <curlpp/Infos.hpp>
using json = nlohmann::json;
std::string user = "[email protected]";
std::string pass = "yourpassword";
std::string url_vocloud = "https://cloud.voctrolabs.com";
int main(int argc, const char * argv[]) {
curlpp::Easy request;
json payload;
// set parameters for transformation
float timestretch = 0.8;
float pitchshift = 3.0;
payload = {
{"time_stretch_ratio", timestretch},
{"pitch_shift", pitchshift},
{"audio_upload_parts", 1}
};
request.setOpt(new curlpp::options::Url(url_vocloud + "/api/voscale/tasks"));
std::list<std::string> header;
header.push_back("Content-Type: application/json");
request.setOpt(new curlpp::options::HttpHeader(header));
request.setOpt(new curlpp::options::PostFields(payload.dump()));
request.setOpt(new curlpp::options::UserPwd(user + ":" + pass));
std::ostringstream response;
request.setOpt(new curlpp::options::WriteStream(&response));
request.perform();
json response_create = json::parse(response.str());
std::cout << response.str() << std::endl;
std::cout << std::endl << "*** UPLOAD FILES ***" << std::endl;
// Audio 1
std::string filepath = "test.wav";
std::string url = response_create["audio_upload_urls"][0];
request.reset();
request.setOpt(new curlpp::options::ConnectTimeout(2));
request.setOpt(new curlpp::options::Header(false));
request.setOpt(new curlpp::options::Url(url));
request.setOpt(new curlpp::options::Put(true));
FILE* wFile;
wFile = fopen(filepath.c_str(), "rb");
fseek(wFile, 0, SEEK_END);
long size = ftell(wFile);
fseek(wFile, 0, SEEK_SET);
request.setOpt(new curlpp::options::ReadFile(wFile));
request.setOpt(new curlpp::options::InfileSize(size));
request.perform();
std::cout << "status_code:" << curlpp::infos::ResponseCode::get(request) << std::endl;
std::cout << "\n*** START TASK ***" << std::endl;
std::string id = response_create["id"];
std::string task_url = url_vocloud + "/api/voscale/tasks/" + id;
std::string start_url = task_url + "/start";
json payload_start = {{"task_url", task_url}};
request.reset();
request.setOpt(new curlpp::options::Url(start_url));
header.clear();
header.push_back("Content-Type: application/json");
request.setOpt(new curlpp::options::HttpHeader(header));
request.setOpt(new curlpp::options::PostFields(payload_start.dump()));
request.setOpt(new curlpp::options::UserPwd(user + ":" + pass));
request.setOpt(new curlpp::options::WriteStream(&response));
request.perform();
std::cout << response.str() << std::endl;
json response_start = json::parse(response.str());
std::cout << "\n*** TASK PROCESSED? ***" << std::endl;
json response_status;
while (true) {
std::this_thread::sleep_for(std::chrono::seconds(1));
request.reset();
request.setOpt(new curlpp::options::Url(task_url));
request.setOpt(new curlpp::options::UserPwd(user + ":" + pass));
request.setOpt(new curlpp::options::WriteStream(&response));
request.perform();
response_status = json::parse(response.str());
if (response_status["status"] == "finished" || response_status["status"] == "failed")
break;
else
std::cout << "-------" << std::endl;
}
std::string mixUrl = response_status["audio_url"];
std::cout << "** Output URL: " << mixUrl << std::endl;
request.reset();
request.setOpt(new curlpp::options::Url(url));
std::ofstream outfile ("output.wav", std::ofstream::binary);
request.setOpt(new curlpp::options::WriteStream(&outfile));
request.perform();
long responseCode = curlpp::infos::ResponseCode::get(request);
if (responseCode == 200) {
std::cout << "File written to output.wav" << std::endl;
} else {
std::cout << "Error " << responseCode << " downloading file";
return -1;
}
return 0;
}
</code>
</pre>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-offset-3 col-sm-6">
<h3>Standalone SDK</h3>
<p>
All tools available in the Voiceful API are also available as a Standalone SDK, which can be integrated as cross-platform C++ libraries. (SDK clients available upon request).
</p>
<div id="standalone-code" class="code-tabs">
<!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#standalone-code-c++" aria-controls="home" role="tab" data-toggle="tab">C++</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="standalone-code-c++">
<pre class="pre-scrollable">
<code class="lang-c++">
#include "VoTransLib_api.h"
/***************************************************************
C++ usage example for VOICEFUL VoTrans Stand Alone SDK
The below code is incomplete, it lacks audio in/out that will
be implemented using standard audio driver libraries or
reading from audio files on disk
****************************************************************/
//VoTrans object
void* mVoTrans = NULL;
//parameters
float gain_val = 0.9f;
float pitch_val = 3.f;
float mTimbreParameters[5] = { 0.5f, 0.6f, 0.7f, 0.55f, 0.5f };
float vibratodepth_val = 0.2f;
float vibratofreq_val = 0.3f;
float robot_val = 0.0f;
float alien_val = 0.0f;
float pitchcorrection_val = 0.0f;
float harmonizer_val = 0.0f;
//INITIALIZATION OF THE LIBRARY
int init()
{
int mnCh = 2; //number of channels
float mSampleRate = 44100.f;
int mBlockSize = 256;
mVoTrans = VT_Create();
//CONFIGURATION
int highQuality = 1;
int noisy = 0;
int bypass = 0;
VT_Configure(mnCh, mSampleRate, mBlockSize,
highQuality, noisy, bypass, mVoTrans);
VT_SetPreAnalysis(NULL, mVoTrans);
VT_BeginProcess(mVoTrans);
}
//PROCESS (in loop)
//This function will be the audio driver callback if used in realtime or
//called in a loop while reading from a disk file or memory buffer if
//transforming offline samples
void ProcessCallback(float* inbuffer, float* outbuffer)
{
//set parameters (e.g. from gui)
VT_SetGainParameter(gain_val, mVoTrans);
VT_SetPitchTranspositionInSemitonesParameter(pitch_val, mVoTrans);
VT_SetTimbreParameters(mTimbreParameters, mVoTrans);
VT_SetVibratoDepthParameter(vibratodepth_val, mVoTrans);
VT_SetVibratoFreqParameter(vibratofreq_val, mVoTrans);
VT_SetRobotParameter(robot_val, mVoTrans);
VT_SetAlienParameter(alien_val, mVoTrans);
VT_SetPitchCorrectionParameter(pitchcorrection_val, mVoTrans);
VT_SetHarmonizerParameter(harmonizer_val, mVoTrans);
//inbuffer & outbuffer memory is allocated by the user,
//DoProcessFloat fills the outbuffer with a maximum of
//configured blocksize (e.g. mBlockSize=256)
int n = VT_DoProcessFloat(inbuffer, outbuffer, mVoTrans);
}
//DESTROY
void end()
{
VT_EndProcess(mVoTrans);
VT_Destroy(mVoTrans);
}
</code>
</pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="tools" class="row section text-center">
<div class="col-xs-12 col-sm-offset-3 col-sm-6">
<h2>TOOLKIT FEATURES</h2>
<div class="vertical-block">
<img src="img/simbol1.png">
<h4>Voice generation | VoSyn</h4>
<p> Our expressive voice generation approach, based on Deep Learning, was initially developed to generate artificial singing voice with high realism. It can learn a model from existing recordings of any individual and generate new speech or singing content.
<strong><a data-toggle="modal" href="#vosyn-modal">+More info</a></strong>
</p>
</div>
<div class="vertical-block">
<img src="img/simbol2.png">
<h4>Voice Transformation | VoTrans</h4>
<p>
We can transform an actor's voice into a monster vocalization for a film, change a male voice into a kid or elder voice, and integrate it in real-time in games, social apps, or music applications.
<strong><a data-toggle="modal" href="#votrans-modal">+More info</a></strong>
</p>
</div>
<div class="vertical-block">
<img src="img/simbol3.png">
<h4>Voice Alignment and Pitch Correction | VoAlign</h4>
<p>
VoAlign analyzes and automatically corrects a voice recording without losing quality. We can align it to a reference recording for lip-syncing or ADR, or apply pitch correction automatically to an estimated musical key. <br>
<strong><a data-toggle="modal" href="#voalign-modal">+More info</a></strong>
</p>
</div>
<div class="vertical-block">
<img src="img/simbol4.png">
<h4>Voice Description | VoDesc</h4>
<p>
This voice analysis tool extracts acoustic and musical information from a voice recording. Data can be sent in real-time, or exported in a readable format to be used in applications such as visualization, classification, monitoring or singing rating.
<strong><a data-toggle="modal" href="#vodesc-modal">+More info</a></strong>
</p>
</div>
<div class="vertical-block">
<img src="img/simbol1.png">
<h4>Time-scaling and Pitch-shifting | VoScale</h4>
<p>
Beyond voice signals, Voiceful includes also a high-quality time-scaling and pitch-shifting to process any audio content (music, field recordings, dialogues, etc).
<strong><a data-toggle="modal" href="#voscale-modal">+More info</a></strong>
</p>
</div>
<div class="vertical-block">
<img src="img/simbol2.png">
<h4>Mixing and FX | VoMix</h4>
<p>
VoMix works as a virtual DAW with all standard audio effects (autogain, compression, EQ, reverb, delay, panning, mixing, etc.) to deliver audio in a professional-like quality.
<strong><a data-toggle="modal" href="#vomix-modal">+More info</a></strong>
</p>
</div>
</div>
</div>
<div id="customize" class="row section grey-bg text-center">
<div class="col-xs-12">
<h2>CUSTOM DEVELOPMENTS</h2>
</div>
<div class="col-xs-offset-1 col-xs-10">
<div class="row">
<div class="col-xs-12 col-sm-offset-2 col-sm-8 col-md-offset-3 col-md-6">
<img class="icon-img" src="img/icon5.png">
<p class="subtitle">We can extend and customize our technologies for the specific needs of your project idea. Talk to us!</p>
</div>
</div>
</div>
</div>
<div id="request" class="row section text-center">
<div class="col-xs-12">
<h2>EVALUATION ACCOUNT</h2>
</div>
<div class="col-xs-12 col-sm-offset-2 col-sm-8 col-md-offset-3 col-md-6">
<p class="subtitle">1-month access to Voiceful Cloud API for evaluation</p>
<p>Request us a free evaluation account and obtain the Terms of Use and Pricing information. <em>(Account limited to evaluation purposes and only for professionals: companies, business individuals or research institutions).</em></p>
<form action="https://formspree.io/[email protected]" method="POST">
<div class="form-group">
<input name="name" type="text" class="form-control" placeholder="Name">
</div>
<div class="form-group">
<input name="email" type="email" class="form-control" placeholder="Email">
</div>
<div class="form-group">
<input name="company" type="text" class="form-control" placeholder="Company">
</div>
<div class="form-group">
<select name="Sector" class="form-control">
<option value="Sector" disabled selected>Sector</option>
<option value="Advertising and Brands">Advertising and Brands</option>
<option value="Apps and Game developer">Apps and Game developer</option>
<option value="Music industry">Music industry</option>
<option value="Film/VR industry">Film/VR industry</option>
<option value="Research & Development">Research & Development</option>
<option value="Education">Education</option>
<option value="Other">Other</option>
</select>
</div>
<div class="form-group">
<select name="Integration" class="form-control">
<option value="Integration" disabled selected>Integration</option>
<option value="Cloud API">Cloud API</option>
<option value="Unity3D Package">Unity3D Package</option>
<option value="Standalone SDK (Mobile)">Standalone SDK (Mobile)</option>
<option value="Standalone SDK (Server/Desktop)">Standalone SDK (Server/Desktop)</option>
<option value="All">All</option>
</select>
</div>
<div class="form-group">
<textarea name="purpose" class="form-control" rows="3" placeholder="Purpose of use"></textarea>
</div>
<input type="hidden" name="_subject" value="Voiceful.io Evaluation Request" />
<button id="send" type="submit" class="btn btn-danger pull-right">SEND</button>
</form>
<div class="clearfix"></div>
</div>
</div>
<div id="customize" class="row section grey-bg text-center">
<div class="col-xs-12">
<h2>TECHNOLOGY BACKGROUND</h2>
</div>
<div class="col-xs-offset-1 col-xs-10">
<div class="row">
<div class="col-xs-12 col-sm-offset-2 col-sm-8 col-md-offset-3 col-md-6">
<p>Voiceful combines +15 years of R&D expertise in audio and music technologies with latest artificial intelligence for voice generation.
Our patented technologies originate from academic research carried out by Voctro Labs’ cofounders at <a href="http://www.mtg.upf.edu"> MTG-UPF</a>, and since 2011 they have been integrated in award-wining applications worldwide. Our technology portfolio is being continuously extended with recent research in the field.
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="container-fluid">
<div class="row">
<div class="col-xs-12 col-sm-3">
<img id="footer-logo" src="img/footer_logo.png" srcset="img/footer_logox2.png 2x">
<p>
Voiceful is a product of <strong>Voctro Labs</strong><br>
<strong>
info @ voctrolabs . com<br>
+34 931 587 637<br>
C/ Pujades 74-80 08005<br>
Barcelona<br>
</strong>
</p>
<p><a data-toggle="modal" href="#legal-modal">LEGAL NOTICE</a></p>
<p><a data-toggle="modal" href="#privacy-modal">PRIVACY</a></p>
</div>
<div class="col-xs-12 col-sm-offset-6 col-sm-3 col-lg-offset-7 col-lg-2">
<div id="social">
<h5>FOLLOW US ON</h5>
<a href="https://www.facebook.com/VoctroLabs/" target="_blank">
<img src="img/facebook.png">
</a>
<a href="https://twitter.com/VoctroLabs" target="_blank">
<img src="img/twitter.png">
</a>
<a href="https://www.youtube.com/user/voctrolabs" target="_blank">
<img src="img/youtube.png">
</a>
</div>
</div>
</div>
</div>
</footer>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="js/vendor/jquery.min.js"></script>
<script src="js/vendor/bootstrap.min.js"></script>
<script src="js/vendor/[email protected]/highlight.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="js/vendor/ie10-viewport-bug-workaround.js"></script>
<script src="js/developers.js"></script>
</body>
</html>