Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ai
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
ai
Merge requests
!611
Resolve
#3525028
"Speech to speech"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
Resolve
#3525028
"Speech to speech"
issue/ai-3525028:3525028-speech-to-speech
into
1.0.x
Overview
0
Commits
1
Pipelines
2
Changes
1
Closed
Paul Sheldrake
requested to merge
issue/ai-3525028:3525028-speech-to-speech
into
1.0.x
3 weeks ago
Overview
0
Commits
1
Pipelines
2
Changes
1
Expand
Closes
#3525028
0
0
Merge request reports
Compare
1.0.x
version 1
315b97b3
3 weeks ago
1.0.x (base)
and
latest version
latest version
315b97b3
1 commit,
3 weeks ago
version 1
315b97b3
5 commits,
3 weeks ago
1 file
+
2
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
modules/ai_api_explorer/src/Plugin/AiApiExplorer/SpeechToSpeechGenerator.php
+
2
−
1
Options
@@ -143,7 +143,8 @@ final class SpeechToSpeechGenerator extends AiApiExplorerPluginBase {
$destination
=
'temporary://ai-explorers/'
;
$this
->
fileSystem
->
prepareDirectory
(
$destination
,
FileSystemInterface
::
CREATE_DIRECTORY
);
$random
=
(
string
)
rand
();
$file_url
=
$this
->
fileSystem
->
saveData
(
$audio_normalized
,
$destination
.
'/'
.
md5
(
$random
)
.
'.mp3'
);
$binary_data
=
$audio_normalized
[
0
]
->
getBinary
();
$file_url
=
$this
->
fileSystem
->
saveData
(
$binary_data
,
$destination
.
'/'
.
md5
(
$random
)
.
'.mp3'
);
$file_name
=
basename
(
$file_url
);
$url
=
Url
::
fromRoute
(
'system.temporary'
,
[],
[
'query'
=>
[
'file'
=>
'ai-explorers/'
.
$file_name
]]);
$form
[
'right'
][
'response'
][
'#context'
][
'ai_response'
][
'response'
]
=
[
Loading