php analyse de transcript audio

This commit is contained in:
Tykayn 2023-02-16 14:49:46 +01:00 committed by tykayn
parent 48cf3efea8
commit 893f21b8c6
2 changed files with 407 additions and 5 deletions

View File

@ -175,24 +175,246 @@ $data = ["
00:02:07.000
"
];
// 2023-02-02
$data = ['00:06:31.000
00:04:48.639
00:02:21.000
00:01:13.000
00:03:43.000
00:13:41.000
00:01:21.000
00:04:39.000
00:01:16.000
00:03:39.000
00:03:58.000
00:00:49.000
00:08:27.000
00:04:10.000
'];
$data = explode("\n" , $data[0]);
// intervenants selon Le Bétonnier
$data = ['00:08:24.000
00:09:16.000
00:07:07.000
00:04:32.000
00:03:05.000
00:07:23.000
00:10:47.000
00:12:11.000
00:06:36.000
00:16:13.000
00:10:45.000
00:00:43.000
00:20:18.000
00:18:42.000
00:10:18.000
00:01:32.000
00:15:34.000
00:04:02.000
00:01:52.000
00:01:11.000
00:01:31.000
00:04:03.000
00:04:27.000
00:05:32.000
00:00:51.000
00:04:01.000
00:02:40.000
00:03:15.000
00:01:09.000
00:04:21.000
00:01:31.000
00:02:25.000
00:06:47.000
00:04:25.000
00:04:36.000
00:01:16.000
00:07:14.000
00:04:08.000
00:03:03.000
00:02:15.000
00:04:50.000
00:02:28.000
00:03:58.000
00:07:51.000
00:06:29.000
00:10:02.000
00:03:46.000
00:11:29.000
00:07:27.000
00:26:03.000
00:09:09.000
00:17:43.000
00:15:08.000
00:12:21.000
00:15:29.000
00:02:48.000
00:02:12.000
00:15:12.000
00:19:19.000
00:06:31.000
00:02:21.000
00:01:13.000
00:01:21.000
00:04:39.000
00:01:16.000
00:03:39.000
00:03:58.000
00:00:49.000
00:08:27.000
00:04:10.000
00:02:48.000
00:02:10.000
00:02:08.000
00:00:31.000
00:02:05.000
00:00:55.000
00:02:11.000
00:02:16.000
00:02:19.000
00:02:02.000
00:02:19.000
00:02:57.000
00:02:38.000
00:02:45.000
00:01:25.000
00:02:11.000
00:01:56.000
00:02:56.000
00:02:01.000
00:01:58.000
00:01:33.000
00:00:53.000
00:01:33.000
00:01:22.000
00:00:56.000
00:01:47.000
00:01:57.000
00:01:09.000
00:01:07.000
00:00:09.000
00:06:29.555
00:02:18.000
00:01:38.000
00:01:52.000
00:01:36.000
00:00:31.000
00:00:49.000
00:00:45.000
00:00:23.000
00:01:49.000
00:02:05.000
00:02:36.000
00:01:00.000
00:03:24.000
00:01:15.000
00:00:56.000
00:01:58.000
00:02:24.000
00:01:30.000
00:01:24.000
00:01:01.000
00:02:06.000
00:00:57.000
00:02:05.000
00:00:41.000
00:02:03.000
00:00:05.000
00:03:33.000
00:01:05.000
00:02:34.000
00:02:08.000
00:00:43.000
00:01:23.000
00:02:20.000
00:02:09.000
00:00:14.000
00:02:38.000
00:00:15.000
00:02:47.000
00:02:42.000
00:03:37.000
00:02:07.000
00:01:26.000
00:00:24.000
00:04:35.000
00:00:57.000
00:01:31.000
00:03:21.000
00:01:37.000
00:00:31.000
00:02:32.000
00:02:32.000
00:05:36.000
00:03:55.000
00:01:33.000
00:01:34.000
00:02:23.000
00:02:06.000
00:02:03.000
00:02:41.000
00:02:10.000
00:02:04.000
00:01:22.000
00:13:08.000
00:22:08.000
00:00:59.000
00:15:02.000
00:13:35.000
00:13:20.000
00:17:34.000
00:13:34.000
00:01:53.000
00:01:57.000
00:16:17.000
00:02:08.000
00:04:48.000
00:16:00.000
00:00:14.000
00:00:51.000
00:02:06.000
00:01:19.000
00:03:36.000
00:01:30.000
00:06:00.000
00:01:53.000
00:07:00.000
00:02:05.000
00:02:41.000
00:00:51.000
00:03:33.000
00:00:48.000
00:01:53.000
00:01:51.275
00:02:11.000
00:01:15.000
00:08:53.000
00:14:55.000
00:02:08.000
00:01:20.000
00:13:41.000
'];
var_dump($data);
$data = explode("\n", $data[0]);
//var_dump($data);
$results = [];
foreach ($data as $datum) {
if($datum){
if ($datum) {
$results[] = convertTimeStampToSeconds($datum);
$results[] = convertTimeStampToSeconds($datum);
}
}
function convertTimeStampToSeconds($timestamp)
{
// if (!$timestamp) {
// return ' '
// }
$converted = '';
$boom = explode(':', $timestamp);
$seconds = explode('.', $boom[2]);
@ -200,7 +422,8 @@ function convertTimeStampToSeconds($timestamp)
return $converted;
}
echo "\n";
foreach ($results as $result) {
echo "\n" . $result . ' ';
echo round($result) . "\n";
}

View File

@ -0,0 +1,179 @@
<?php
$data="
CNDP
CNDP
FNE
CNDP
ANCCLI
Sénat
PCF
Maire de Dieppe
Science-po
SDN
EDF
CNDP
CNDP
EDF
CNDP
CNDP
EDF
CNDP
CNDP
ADEME
Négawatt
EDF
Ministère de la transition écologique
CNDP
CNDP
RTE
EDF
CNDP
CNDP
SFEN
ENSAE
CNDP
IRSN
Global Chance
EDF
CNDP
CNDP
Cour des comptes
CNDP
EDF
CNDP
CNDP
CNDP
Maire de CAEN
EDF
IRSN
EDF
CNDP
EDF
ARS
RTE
CNDP
CNDP
Sciences Po
ACRO
Sciences Po
Greenpeace
Sciences Po
Commission environementale normandie
CLIN
GIEC
DTM
EDF
Conseil départemental
CNDP
FNE
Chambre d'agriculture
DREAL
EDF
CNDP
CNDP
GIEC
Préfecture
CNDP
CNDP
Elu
CNDP
CNDP
CNDP
CNDP
GIFEN
CNDP
Communauté de communes
Commission développement économique
CCI
CESER
EDF
CNDP
CNDP
Normandie Energies
Négawatt
CNDP
Pôle Emploi
Délégué à l'action régionale Normandie
Préfecture
CNDP
CNDP
NEA
FNE
Energie et Environement en Débat dans l'Aisne
Global Chance
CNRS
SFEN
CFECGC
Global Chance
CNDP
DNN
EDF
EPE
CNDP
CNDP
CNDP
CNDP
CNDP
FNE
CNDP
EDF
CNDP
EDF
EDF
CNDP
Voix du Nucléaire
Global Chance
IRSN
EDF
?
Andra
ENS ULM
CNDP
ORANO
EELV
Greenpeace
CNDP
Andra
CNDP
CNDP
CEA
Global Chance
SFEN
Fondation pour la nature et l'homme
Global Chance
CNDP
Cérémé
Cour des comptes
CNDP
CNDP
Ville de Lyon
";
$data = explode("\n", trim($data));
$data = array_unique($data);
sort($data);
join('\n', $data);
foreach ($data as $d) {
echo $d . "\n";
}